Package io.jans.as.server.model.common
Class UnmodifiableAuthorizationGrant
- java.lang.Object
-
- io.jans.as.server.model.common.UnmodifiableAuthorizationGrant
-
- All Implemented Interfaces:
IAuthorizationGrant
public class UnmodifiableAuthorizationGrant extends Object implements IAuthorizationGrant
Gives ability to use authorization grant in read-only mode.- Version:
- September 30, 2021
- Author:
- Yuriy Zabrovarnyy, Javier Rojas Blum
-
-
Field Summary
Fields Modifier and Type Field Description static String
NOT_ALLOWED_FOR_UNMODIFIABLE_AUTHORIZATION_GRANT
-
Constructor Summary
Constructors Constructor Description UnmodifiableAuthorizationGrant(IAuthorizationGrant grant)
-
Method Summary
-
-
-
Field Detail
-
NOT_ALLOWED_FOR_UNMODIFIABLE_AUTHORIZATION_GRANT
public static final String NOT_ALLOWED_FOR_UNMODIFIABLE_AUTHORIZATION_GRANT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UnmodifiableAuthorizationGrant
public UnmodifiableAuthorizationGrant(IAuthorizationGrant grant)
-
-
Method Detail
-
getGrantType
public io.jans.as.model.common.GrantType getGrantType()
- Specified by:
getGrantType
in interfaceIAuthorizationGrant
-
getGrantId
public String getGrantId()
- Specified by:
getGrantId
in interfaceIAuthorizationGrant
-
setGrantId
public void setGrantId(String grantId)
- Specified by:
setGrantId
in interfaceIAuthorizationGrant
-
getAuthorizationCode
public AuthorizationCode getAuthorizationCode()
- Specified by:
getAuthorizationCode
in interfaceIAuthorizationGrant
-
setAuthorizationCode
public void setAuthorizationCode(AuthorizationCode authorizationCode)
- Specified by:
setAuthorizationCode
in interfaceIAuthorizationGrant
-
getNonce
public String getNonce()
- Specified by:
getNonce
in interfaceIAuthorizationGrant
-
setNonce
public void setNonce(String nonce)
- Specified by:
setNonce
in interfaceIAuthorizationGrant
-
getSub
public String getSub()
- Specified by:
getSub
in interfaceIAuthorizationGrant
-
createAccessToken
public AccessToken createAccessToken(ExecutionContext executionContext)
- Specified by:
createAccessToken
in interfaceIAuthorizationGrant
-
createRefreshToken
public RefreshToken createRefreshToken(ExecutionContext executionContext)
- Specified by:
createRefreshToken
in interfaceIAuthorizationGrant
-
createRefreshToken
public RefreshToken createRefreshToken(ExecutionContext executionContext, int lifetime)
- Specified by:
createRefreshToken
in interfaceIAuthorizationGrant
-
createIdToken
public IdToken createIdToken(String nonce, AuthorizationCode authorizationCode, AccessToken accessToken, RefreshToken refreshToken, String state, ExecutionContext executionContext)
- Specified by:
createIdToken
in interfaceIAuthorizationGrant
-
getRefreshToken
public RefreshToken getRefreshToken(String refreshTokenCode)
- Specified by:
getRefreshToken
in interfaceIAuthorizationGrant
-
getAccessToken
public AbstractToken getAccessToken(String tokenCode)
- Specified by:
getAccessToken
in interfaceIAuthorizationGrant
-
revokeAllTokens
public void revokeAllTokens()
- Specified by:
revokeAllTokens
in interfaceIAuthorizationGrant
-
checkExpiredTokens
public void checkExpiredTokens()
- Specified by:
checkExpiredTokens
in interfaceIAuthorizationGrant
-
checkScopesPolicy
public String checkScopesPolicy(String scope)
- Specified by:
checkScopesPolicy
in interfaceIAuthorizationGrant
-
getUser
public io.jans.as.common.model.common.User getUser()
- Specified by:
getUser
in interfaceIAuthorizationGrant
-
getUserId
public String getUserId()
- Specified by:
getUserId
in interfaceIAuthorizationGrant
-
getUserDn
public String getUserDn()
- Specified by:
getUserDn
in interfaceIAuthorizationGrant
-
getAuthorizationGrantType
public AuthorizationGrantType getAuthorizationGrantType()
- Specified by:
getAuthorizationGrantType
in interfaceIAuthorizationGrant
-
getClientId
public String getClientId()
- Specified by:
getClientId
in interfaceIAuthorizationGrant
-
getClient
public io.jans.as.common.model.registration.Client getClient()
- Specified by:
getClient
in interfaceIAuthorizationGrant
-
getClientDn
public String getClientDn()
- Specified by:
getClientDn
in interfaceIAuthorizationGrant
-
getAccessTokens
public List<AccessToken> getAccessTokens()
- Specified by:
getAccessTokens
in interfaceIAuthorizationGrant
-
getScopes
public Set<String> getScopes()
- Specified by:
getScopes
in interfaceIAuthorizationGrant
-
getRefreshTokensCodes
public Set<String> getRefreshTokensCodes()
- Specified by:
getRefreshTokensCodes
in interfaceIAuthorizationGrant
-
getAccessTokensCodes
public Set<String> getAccessTokensCodes()
- Specified by:
getAccessTokensCodes
in interfaceIAuthorizationGrant
-
getRefreshTokens
public List<RefreshToken> getRefreshTokens()
- Specified by:
getRefreshTokens
in interfaceIAuthorizationGrant
-
setRefreshTokens
public void setRefreshTokens(List<RefreshToken> refreshTokens)
- Specified by:
setRefreshTokens
in interfaceIAuthorizationGrant
-
getLongLivedAccessToken
public AccessToken getLongLivedAccessToken()
- Specified by:
getLongLivedAccessToken
in interfaceIAuthorizationGrant
-
getIdToken
public IdToken getIdToken()
- Specified by:
getIdToken
in interfaceIAuthorizationGrant
-
getJwtAuthorizationRequest
public JwtAuthorizationRequest getJwtAuthorizationRequest()
- Specified by:
getJwtAuthorizationRequest
in interfaceIAuthorizationGrant
-
setJwtAuthorizationRequest
public void setJwtAuthorizationRequest(JwtAuthorizationRequest jwtAuthorizationRequest)
- Specified by:
setJwtAuthorizationRequest
in interfaceIAuthorizationGrant
-
getAuthenticationTime
public Date getAuthenticationTime()
- Specified by:
getAuthenticationTime
in interfaceIAuthorizationGrant
-
getTokenEntity
public io.jans.model.token.TokenEntity getTokenEntity()
- Specified by:
getTokenEntity
in interfaceIAuthorizationGrant
-
setTokenEntity
public void setTokenEntity(io.jans.model.token.TokenEntity token)
- Specified by:
setTokenEntity
in interfaceIAuthorizationGrant
-
setLongLivedAccessToken
public void setLongLivedAccessToken(AccessToken longLivedAccessToken)
- Specified by:
setLongLivedAccessToken
in interfaceIAuthorizationGrant
-
setIdToken
public void setIdToken(IdToken idToken)
- Specified by:
setIdToken
in interfaceIAuthorizationGrant
-
setScopes
public void setScopes(Collection<String> scopes)
- Specified by:
setScopes
in interfaceIAuthorizationGrant
-
setAccessTokens
public void setAccessTokens(List<AccessToken> accessTokens)
- Specified by:
setAccessTokens
in interfaceIAuthorizationGrant
-
setTxTokens
public void setTxTokens(List<TxToken> txTokens)
- Specified by:
setTxTokens
in interfaceIAuthorizationGrant
-
getAcrValues
public String getAcrValues()
- Specified by:
getAcrValues
in interfaceIAuthorizationGrant
-
setAcrValues
public void setAcrValues(String authMode)
- Specified by:
setAcrValues
in interfaceIAuthorizationGrant
-
getSessionDn
public String getSessionDn()
- Specified by:
getSessionDn
in interfaceIAuthorizationGrant
-
setSessionDn
public void setSessionDn(String sessionDn)
- Specified by:
setSessionDn
in interfaceIAuthorizationGrant
-
save
public void save()
Description copied from interface:IAuthorizationGrant
Saves changes asynchronously- Specified by:
save
in interfaceIAuthorizationGrant
-
-