Class IdcsMtRoleMapperProvider.Builder<B extends IdcsMtRoleMapperProvider.Builder<B>>
- java.lang.Object
-
- io.helidon.security.providers.idcs.mapper.IdcsRoleMapperProviderBase.Builder<IdcsMtRoleMapperProvider.Builder<B>>
-
- io.helidon.security.providers.idcs.mapper.IdcsMtRoleMapperProvider.Builder<B>
-
- Type Parameters:
B
- type of a descendant of this builder
- All Implemented Interfaces:
Builder<IdcsMtRoleMapperProvider>
,Supplier<IdcsMtRoleMapperProvider>
- Enclosing class:
- IdcsMtRoleMapperProvider
public static class IdcsMtRoleMapperProvider.Builder<B extends IdcsMtRoleMapperProvider.Builder<B>> extends IdcsRoleMapperProviderBase.Builder<IdcsMtRoleMapperProvider.Builder<B>> implements Builder<IdcsMtRoleMapperProvider>
Fluent API builder forIdcsMtRoleMapperProvider
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IdcsMtRoleMapperProvider
build()
Build the instance from this builder.B
cache(EvictableCache<IdcsMtRoleMapperProvider.MtCacheKey,List<Grant>> roleCache)
Use explicitEvictableCache
for role caching.B
config(Config config)
Update this builder state from configuration.B
idcsAppNameTokenHandler(TokenHandler idcsAppNameTokenHandler)
Configure token handler for IDCS Application name.B
idcsTenantTokenHandler(TokenHandler idcsTenantTokenHandler)
Configure token handler for IDCS Tenant ID.B
multitenantEndpoints(IdcsMtRoleMapperProvider.MultitenancyEndpoints endpoints)
Replace default endpoint provider in multitenant IDCS setup.-
Methods inherited from class io.helidon.security.providers.idcs.mapper.IdcsRoleMapperProviderBase.Builder
addSubjectType, defaultIdcsSubjectType, oidcConfig, oidcConfig, subjectTypes
-
-
-
-
Method Detail
-
build
public IdcsMtRoleMapperProvider build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<B extends IdcsMtRoleMapperProvider.Builder<B>>
- Returns:
- instance of the built type
-
config
public B config(Config config)
Description copied from class:IdcsRoleMapperProviderBase.Builder
Update this builder state from configuration. Expects:- oidc-config to load an instance of
OidcConfig
- cache-config (optional) to load instances of
EvictableCache
for caching - default-idcs-subject-type to use when not defined in a JWT, either "user" or
IdcsRoleMapperProviderBase.IDCS_SUBJECT_TYPE_CLIENT
, defaults to "user"
- Overrides:
config
in classIdcsRoleMapperProviderBase.Builder<IdcsMtRoleMapperProvider.Builder<B extends IdcsMtRoleMapperProvider.Builder<B>>>
- Parameters:
config
- current node must have "oidc-config" as one of its children- Returns:
- updated builder instance
- oidc-config to load an instance of
-
idcsAppNameTokenHandler
public B idcsAppNameTokenHandler(TokenHandler idcsAppNameTokenHandler)
Configure token handler for IDCS Application name. By default the header "X-RESOURCE-SERVICE-INSTANCE-IDENTITY-APPNAME" is used.- Parameters:
idcsAppNameTokenHandler
- new token handler to extract IDCS application name- Returns:
- updated builder instance
-
idcsTenantTokenHandler
public B idcsTenantTokenHandler(TokenHandler idcsTenantTokenHandler)
Configure token handler for IDCS Tenant ID. By default the header "X-USER-IDENTITY-SERVICE-GUID" is used.- Parameters:
idcsTenantTokenHandler
- new token handler to extract IDCS tenant ID- Returns:
- updated builder instance
-
multitenantEndpoints
public B multitenantEndpoints(IdcsMtRoleMapperProvider.MultitenancyEndpoints endpoints)
Replace default endpoint provider in multitenant IDCS setup.- Parameters:
endpoints
- endpoints to retrieve tenant specific token and asserter endpoints- Returns:
- updated builder instance
-
cache
public B cache(EvictableCache<IdcsMtRoleMapperProvider.MtCacheKey,List<Grant>> roleCache)
Use explicitEvictableCache
for role caching.- Parameters:
roleCache
- cache to use- Returns:
- updated builder instance
-
-