Package io.jmix.oidc.claimsmapper
Interface ClaimsRolesMapper
- All Known Implementing Classes:
BaseClaimsRolesMapper
,DefaultClaimsRolesMapper
public interface ClaimsRolesMapper
Mapper of claims received from the OpenID Provider into Jmix resource roles and row-level roles. Some
OidcUserMapper
implementations delegate roles mapping to the instance of this interface. If you want to replace standard claims mapper
with your own one, then register a spring bean implementing the current interface in your application.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection<? extends org.springframework.security.core.GrantedAuthority>
toGrantedAuthorities
(Map<String, Object> claims) Transforms collection of roles returned bytoResourceRoles(Map)
andtoRowLevelRoles(Map)
into a collection ofGrantedAuthority
.toResourceRoles
(Map<String, Object> claims) toRowLevelRoles
(Map<String, Object> claims)
-
Method Details
-
toResourceRoles
-
toRowLevelRoles
-
toGrantedAuthorities
default Collection<? extends org.springframework.security.core.GrantedAuthority> toGrantedAuthorities(Map<String, Object> claims) Transforms collection of roles returned bytoResourceRoles(Map)
andtoRowLevelRoles(Map)
into a collection ofGrantedAuthority
.- Parameters:
claims
- pieces of information about the user returned by the OpenID Provider- Returns:
- a collection of granted authorities that contain information about resource and row-level roles available to the user
-