Package org.entur.jwt.spring.auth0
Class Auth0JwtAuthorityMapper
- java.lang.Object
-
- org.entur.jwt.spring.auth0.Auth0JwtAuthorityMapper
-
- All Implemented Interfaces:
org.entur.jwt.spring.filter.JwtAuthorityMapper<com.auth0.jwt.interfaces.DecodedJWT>
public class Auth0JwtAuthorityMapper extends java.lang.Object implements org.entur.jwt.spring.filter.JwtAuthorityMapper<com.auth0.jwt.interfaces.DecodedJWT>
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanextractAuth0Permissionsprotected booleanextractKeycloakResourceAccessprotected static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description Auth0JwtAuthorityMapper(boolean auth0Permissions, boolean keycloakResourceAccess)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddScope(com.auth0.jwt.interfaces.DecodedJWT token, java.util.List<org.springframework.security.core.GrantedAuthority> authorities)protected java.lang.StringasPermission(java.lang.String permission)protected java.lang.StringasRole(java.lang.String role)protected java.lang.StringasScope(java.lang.String scope)java.util.List<org.springframework.security.core.GrantedAuthority>getGrantedAuthorities(com.auth0.jwt.interfaces.DecodedJWT token)
-
-
-
Method Detail
-
getGrantedAuthorities
public java.util.List<org.springframework.security.core.GrantedAuthority> getGrantedAuthorities(com.auth0.jwt.interfaces.DecodedJWT token)
- Specified by:
getGrantedAuthoritiesin interfaceorg.entur.jwt.spring.filter.JwtAuthorityMapper<com.auth0.jwt.interfaces.DecodedJWT>
-
asRole
protected java.lang.String asRole(java.lang.String role)
-
addScope
protected void addScope(com.auth0.jwt.interfaces.DecodedJWT token, java.util.List<org.springframework.security.core.GrantedAuthority> authorities)
-
asScope
protected java.lang.String asScope(java.lang.String scope)
-
asPermission
protected java.lang.String asPermission(java.lang.String permission)
-
-