6.7.2. 令牌类型(TPS)Mapping Resolver

Token Processing System 中定义的三个默认 tokenType 映射解析器: formatProfileMappingResolverenrollProfileMappingResolverpinResetProfileMappingResolver。与上一节中讨论的外部注册案例相比,内部注册案例实际是从定义的映射解析器计算的。
令牌类型映射解析器名称定义如下:
op.<op>.mappingResolver=<mapping resolver name>
例如:
op.enroll.mappingResolver=enrollProfileMappingResolver
以下配置示例描述了 enrollProfileMappingResolver
mappingResolver.enrollProfileMappingResolver.class_id=filterMappingResolverImpl
mappingResolver.enrollProfileMappingResolver.mapping.0.filter.appletMajorVersion=1
mappingResolver.enrollProfileMappingResolver.mapping.0.filter.appletMinorVersion=
mappingResolver.enrollProfileMappingResolver.mapping.0.filter.tokenATR=
mappingResolver.enrollProfileMappingResolver.mapping.0.filter.tokenCUID.end=b1000000000000000000
mappingResolver.enrollProfileMappingResolver.mapping.0.filter.tokenCUID.start=b0000000000000000000
mappingResolver.enrollProfileMappingResolver.mapping.0.filter.tokenType=userKey
mappingResolver.enrollProfileMappingResolver.mapping.0.target.tokenType=userKey
mappingResolver.enrollProfileMappingResolver.mapping.1.filter.appletMajorVersion=1
mappingResolver.enrollProfileMappingResolver.mapping.1.filter.appletMinorVersion=
mappingResolver.enrollProfileMappingResolver.mapping.1.filter.tokenATR=
mappingResolver.enrollProfileMappingResolver.mapping.1.filter.tokenCUID.end=a0000000000000001000
mappingResolver.enrollProfileMappingResolver.mapping.1.filter.tokenCUID.start=a0000000000000000000
mappingResolver.enrollProfileMappingResolver.mapping.1.filter.tokenType=soKey
mappingResolver.enrollProfileMappingResolver.mapping.1.target.tokenType=soKey
mappingResolver.enrollProfileMappingResolver.mapping.2.filter.appletMajorVersion=
mappingResolver.enrollProfileMappingResolver.mapping.2.filter.appletMinorVersion=
mappingResolver.enrollProfileMappingResolver.mapping.2.filter.tokenATR=
mappingResolver.enrollProfileMappingResolver.mapping.2.filter.tokenCUID.end=
mappingResolver.enrollProfileMappingResolver.mapping.2.filter.tokenCUID.start=
mappingResolver.enrollProfileMappingResolver.mapping.2.filter.tokenType=
mappingResolver.enrollProfileMappingResolver.mapping.2.target.tokenType=userKey
mappingResolver.enrollProfileMappingResolver.mapping.order=1,0,2
在上例中为 register ProfileMappingResolver 定义了三个映射。映射名为 012mappingResolver.enrollProfileMappingResolver.mapping.order=1,0,2 行定义处理映射的顺序。如果令牌与映射匹配,则不会对顺序进行进一步映射;如果与映射不匹配,就会尝试下一个映射。
如果令牌具有以下参数:
CUID=a0000000000000000011
appletMajorVersion=1
appletMinorVersion=0
extension: tokenType=soKey
使用这个配置的令牌将与映射 1 的过滤器匹配,小应用程序版本匹配,CUID 在指定的开始和结束范围内会失败,扩展名 tokenType 匹配。因此,此令牌将被分配该映射的目标 - soKey.
另外,如果令牌具有以下参数:
CUID=b0000000000000000010
appletMajorVersion=1
appletMinorVersion=1
在这种情况下,令牌将失败,因为 CUID 位于指定范围之外。然后它还将失败映射 0, 因为缺少 tokenType 扩展。然后,此令牌将匹配映射 2,因为它没有指定的过滤器以匹配上一个过滤器的任何令牌。