Package io.jmix.oidc.usermapper
Class DefaultOidcUserMapper
java.lang.Object
io.jmix.oidc.usermapper.BaseOidcUserMapper<DefaultJmixOidcUser>
io.jmix.oidc.usermapper.DefaultOidcUserMapper
- All Implemented Interfaces:
OidcUserMapper<DefaultJmixOidcUser>
The default implementation
OidcUserMapper
implementation that converts OidcUser
into DefaultJmixOidcUser
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getOidcUserUsername
(org.springframework.security.oauth2.core.oidc.user.OidcUser oidcUser) Extracts username from theoidcUser
protected DefaultJmixOidcUser
initJmixUser
(org.springframework.security.oauth2.core.oidc.user.OidcUser oidcUser) Method returns an instance of Jmix user, which may be either a new instance or an instance loaded from the user repository.protected void
populateUserAttributes
(org.springframework.security.oauth2.core.oidc.user.OidcUser oidcUser, DefaultJmixOidcUser jmixUser) Fills attributes ofjmixUser
based on information from theoidcUser
protected void
populateUserAuthorities
(org.springframework.security.oauth2.core.oidc.user.OidcUser oidcUser, DefaultJmixOidcUser jmixUser) Fills authorities ofjmixUser
based on information from theoidcUser
Methods inherited from class io.jmix.oidc.usermapper.BaseOidcUserMapper
performAdditionalModifications, toJmixUser
-
Field Details
-
claimsRolesMapper
-
-
Constructor Details
-
DefaultOidcUserMapper
-
-
Method Details
-
getOidcUserUsername
protected String getOidcUserUsername(org.springframework.security.oauth2.core.oidc.user.OidcUser oidcUser) Description copied from class:BaseOidcUserMapper
Extracts username from theoidcUser
- Specified by:
getOidcUserUsername
in classBaseOidcUserMapper<DefaultJmixOidcUser>
- Returns:
- username
-
initJmixUser
protected DefaultJmixOidcUser initJmixUser(org.springframework.security.oauth2.core.oidc.user.OidcUser oidcUser) Description copied from class:BaseOidcUserMapper
Method returns an instance of Jmix user, which may be either a new instance or an instance loaded from the user repository. Attributes and authorities will lately be filled in other methods. The responsibility of the current method is just to create or load an existing instance.- Specified by:
initJmixUser
in classBaseOidcUserMapper<DefaultJmixOidcUser>
- Parameters:
oidcUser
- OpenID user- Returns:
- new Jmix user instance or Jmix user loaded from user repository
-
populateUserAuthorities
protected void populateUserAuthorities(org.springframework.security.oauth2.core.oidc.user.OidcUser oidcUser, DefaultJmixOidcUser jmixUser) Description copied from class:BaseOidcUserMapper
Fills authorities ofjmixUser
based on information from theoidcUser
- Specified by:
populateUserAuthorities
in classBaseOidcUserMapper<DefaultJmixOidcUser>
-
populateUserAttributes
protected void populateUserAttributes(org.springframework.security.oauth2.core.oidc.user.OidcUser oidcUser, DefaultJmixOidcUser jmixUser) Description copied from class:BaseOidcUserMapper
Fills attributes ofjmixUser
based on information from theoidcUser
- Specified by:
populateUserAttributes
in classBaseOidcUserMapper<DefaultJmixOidcUser>
-