Package dev.soffa.foundation.security
Class DefaultTokenProvider
- java.lang.Object
-
- dev.soffa.foundation.security.DefaultTokenProvider
-
- All Implemented Interfaces:
ClaimsExtractor,TokenProvider
public class DefaultTokenProvider extends java.lang.Object implements TokenProvider, ClaimsExtractor
-
-
Constructor Summary
Constructors Constructor Description DefaultTokenProvider(TokensConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description dev.soffa.foundation.model.Tokencreate(dev.soffa.foundation.model.TokenType type, java.lang.String subjet, java.util.Map<java.lang.String,java.lang.Object> claims)dev.soffa.foundation.model.Tokencreate(dev.soffa.foundation.model.TokenType type, java.lang.String subjet, java.util.Map<java.lang.String,java.lang.Object> claims, int ttlInMinutes)dev.soffa.foundation.model.Authenticationdecode(java.lang.String token)dev.soffa.foundation.model.Authenticationdecode(java.lang.String token, ClaimsExtractor extractor)dev.soffa.foundation.model.AuthenticationdecodejwtWithJwks(java.lang.String token, ClaimsExtractor extractor)dev.soffa.foundation.model.AuthenticationdecodeJwtWithSecret(java.lang.String token, ClaimsExtractor claimsExtractor)dev.soffa.foundation.model.AuthenticationextractInfo(dev.soffa.foundation.model.Token token)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface dev.soffa.foundation.security.TokenProvider
create, getConfig
-
-
-
-
Constructor Detail
-
DefaultTokenProvider
public DefaultTokenProvider(TokensConfig config)
-
-
Method Detail
-
create
public dev.soffa.foundation.model.Token create(dev.soffa.foundation.model.TokenType type, java.lang.String subjet, java.util.Map<java.lang.String,java.lang.Object> claims)- Specified by:
createin interfaceTokenProvider
-
create
public dev.soffa.foundation.model.Token create(dev.soffa.foundation.model.TokenType type, java.lang.String subjet, java.util.Map<java.lang.String,java.lang.Object> claims, int ttlInMinutes)- Specified by:
createin interfaceTokenProvider
-
extractInfo
public dev.soffa.foundation.model.Authentication extractInfo(dev.soffa.foundation.model.Token token)
- Specified by:
extractInfoin interfaceClaimsExtractor- Specified by:
extractInfoin interfaceTokenProvider
-
decode
public dev.soffa.foundation.model.Authentication decode(java.lang.String token)
- Specified by:
decodein interfaceTokenProvider
-
decode
public dev.soffa.foundation.model.Authentication decode(java.lang.String token, ClaimsExtractor extractor)- Specified by:
decodein interfaceTokenProvider
-
decodejwtWithJwks
public dev.soffa.foundation.model.Authentication decodejwtWithJwks(java.lang.String token, ClaimsExtractor extractor)
-
decodeJwtWithSecret
public dev.soffa.foundation.model.Authentication decodeJwtWithSecret(java.lang.String token, ClaimsExtractor claimsExtractor)
-
-