Class IdcsRoleMapperRxProvider
- java.lang.Object
 - 
- io.helidon.security.providers.idcs.mapper.IdcsRoleMapperRxProviderBase
 - 
- io.helidon.security.providers.idcs.mapper.IdcsRoleMapperRxProvider
 
 
 
- 
- All Implemented Interfaces:
 SecurityProvider,SubjectMappingProvider
public class IdcsRoleMapperRxProvider extends IdcsRoleMapperRxProviderBase implements SubjectMappingProvider
SubjectMappingProviderto obtain roles from IDCS server for a user. Supports multi tenancy in IDCS. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIdcsRoleMapperRxProvider.Builder<B extends IdcsRoleMapperRxProvider.Builder<B>>Fluent API builder forIdcsRoleMapperRxProvider.- 
Nested classes/interfaces inherited from class io.helidon.security.providers.idcs.mapper.IdcsRoleMapperRxProviderBase
IdcsRoleMapperRxProviderBase.AppTokenRx 
 - 
 
- 
Field Summary
- 
Fields inherited from class io.helidon.security.providers.idcs.mapper.IdcsRoleMapperRxProviderBase
ACCESS_TOKEN_KEY, IDCS_SUBJECT_TYPE_CLIENT, IDCS_SUBJECT_TYPE_USER, PARENT_CONTEXT_CLIENT_PROPERTY, ROLE_APPROLE, ROLE_GROUP 
 - 
 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedIdcsRoleMapperRxProvider(IdcsRoleMapperRxProvider.Builder<?> builder)Constructor that accepts anyIdcsRoleMapperRxProvider.Builderdescendant. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Single<List<? extends Grant>>addAdditionalGrants(Subject subject, List<Grant> idcsGrants)Extension point to add additional grants that are not retrieved from IDCS.static IdcsRoleMapperRxProvider.Builder<?>builder()Creates a new builder to build instances of this class.protected Single<List<? extends Grant>>computeGrants(Subject subject)Compute grants for the provided subject.static SecurityProvidercreate(Config config)Creates an instance from configuration.protected Single<Subject>enhance(ProviderRequest request, AuthenticationResponse previousResponse, Subject subject)Enhance subject with IDCS roles, reactive.protected Single<List<? extends Grant>>getGrantsFromServer(Subject subject)Retrieves grants from IDCS server.- 
Methods inherited from class io.helidon.security.providers.idcs.mapper.IdcsRoleMapperRxProviderBase
buildSubject, defaultIdcsSubjectType, map, oidcConfig, processRoleRequest 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface io.helidon.security.spi.SecurityProvider
supportedAnnotations, supportedAttributes, supportedConfigKeys, supportedCustomObjects 
- 
Methods inherited from interface io.helidon.security.spi.SubjectMappingProvider
map 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
IdcsRoleMapperRxProvider
protected IdcsRoleMapperRxProvider(IdcsRoleMapperRxProvider.Builder<?> builder)
Constructor that accepts anyIdcsRoleMapperRxProvider.Builderdescendant.- Parameters:
 builder- used to configure this instance
 
 - 
 
- 
Method Detail
- 
builder
public static IdcsRoleMapperRxProvider.Builder<?> builder()
Creates a new builder to build instances of this class.- Returns:
 - a new fluent API builder.
 
 
- 
create
public static SecurityProvider create(Config config)
Creates an instance from configuration.Expects:
- oidc-config to load an instance of 
OidcConfig - cache-config (optional) to load an instance of 
EvictableCachefor role caching 
- Parameters:
 config- configuration of this provider- Returns:
 - a new instance configured from config
 
 - oidc-config to load an instance of 
 
- 
enhance
protected Single<Subject> enhance(ProviderRequest request, AuthenticationResponse previousResponse, Subject subject)
Description copied from class:IdcsRoleMapperRxProviderBaseEnhance subject with IDCS roles, reactive.- Specified by:
 enhancein classIdcsRoleMapperRxProviderBase- Parameters:
 request- provider requestpreviousResponse- authenticated responsesubject- subject to enhance- Returns:
 - future with enhanced subject
 
 
- 
computeGrants
protected Single<List<? extends Grant>> computeGrants(Subject subject)
Compute grants for the provided subject. This implementation gets grants from servergetGrantsFromServer(io.helidon.security.Subject).- Parameters:
 subject- to retrieve roles (or in generalgrants)- Returns:
 - future with grants to be added to the subject
 
 
- 
addAdditionalGrants
protected Single<List<? extends Grant>> addAdditionalGrants(Subject subject, List<Grant> idcsGrants)
Extension point to add additional grants that are not retrieved from IDCS.- Parameters:
 subject- subject to enhanceidcsGrants- grants obtained from IDCS- Returns:
 - grants to add to the subject
 
 
 - 
 
 -