Package io.jans.as.server.model.common
Class AbstractAuthorizationGrant
java.lang.Object
io.jans.as.server.model.common.AbstractAuthorizationGrant
- All Implemented Interfaces:
IAuthorizationGrant
- Direct Known Subclasses:
AuthorizationGrant
- Version:
- September 30, 2021
- Author:
- Yuriy Zabrovarnyy, Javier Rojas Blum, Yuriy Movchan
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConcurrentMap<String,AccessToken> protected io.jans.as.model.configuration.AppConfigurationprotected final ConcurrentMap<String,LogoutStatusJwt> protected final ConcurrentMap<String,RefreshToken> protected ScopeCheckerprotected final ConcurrentMap<String,TxToken> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractAuthorizationGrant(io.jans.as.common.model.common.User user, AuthorizationGrantType authorizationGrantType, io.jans.as.common.model.registration.Client client, Date authenticationTime) -
Method Summary
Modifier and TypeMethodDescriptioncheckScopesPolicy(String requestedScopes) Checks the scopes policy configured according to the type of the authorization grant to limit the issued token scopes.createAccessToken(ExecutionContext executionContext) createRefreshToken(ExecutionContext context) createRefreshToken(ExecutionContext context, int lifetime) getAccessToken(String tokenCode) Gets the access token instance from the id token list or the access token list given its code.intgetAccessTokenLifetimeInSeconds(ExecutionContext executionContext) Returns a list with all the issued access tokens.Returns a list with all the issued access tokens codes.Returns theAuthorizationCode.Returns theAuthorizationGrantType.io.jans.as.model.authzdetails.AuthzDetailsio.jans.as.common.model.registration.ClientReturns theClient.getLogoutStatusJwt(String logoutStatusJwtCode) Gets the logout out jwt instance from the logout status jwt list given its code.Returns a list with all the issued logout status jwts.Returns a list with all the issued logout status jwts.getNonce()getRefreshToken(String refreshTokenCode) Gets the refresh token instance from the refresh token list given its code.Returns a list with all the issued refresh tokens.Returns a list with all the issued refresh tokens codes.Returns a list of the scopes granted to the client.io.jans.model.token.TokenEntitygetTxToken(String txTokenCode) io.jans.as.common.model.common.UsergetUser()Returns the resource owner's.protected voidinit(io.jans.as.common.model.common.User user, AuthorizationGrantType authorizationGrantType, io.jans.as.common.model.registration.Client client, Date authenticationTime) booleanvoidsetAccessTokens(List<AccessToken> accessTokens) voidsetAcrValues(String acrValues) voidsetAuthenticationTime(Date authenticationTime) setAuthorizationChallenge(boolean authorizationChallenge) voidsetAuthorizationCode(AuthorizationCode authorizationCode) Sets theAuthorizationCode.voidsetAuthzDetails(io.jans.as.model.authzdetails.AuthzDetails authzDetails) voidvoidsetCodeChallenge(String codeChallenge) voidsetCodeChallengeMethod(String codeChallengeMethod) voidsetDpopJkt(String dpopJkt) voidsetGrantId(String grantId) voidsetIdToken(IdToken idToken) voidsetJwtAuthorizationRequest(JwtAuthorizationRequest jwtAuthorizationRequest) voidsetLogoutStatusJwts(List<LogoutStatusJwt> tokens) voidsetLongLivedAccessToken(AccessToken longLivedAccessToken) voidvoidsetReferenceId(String referenceId) voidsetRefreshTokens(List<RefreshToken> refreshTokens) voidsetScopes(Collection<String> scopes) voidsetSessionDn(String sessionDn) voidsetStatusListIndex(Integer statusListIndex) voidsetTokenBindingHash(String tokenBindingHash) voidsetTokenEntity(io.jans.model.token.TokenEntity tokenEntity) voidsetTxTokens(List<TxToken> txTokens) voidsetX5ts256(String x5ts256) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.jans.as.server.model.common.IAuthorizationGrant
checkExpiredTokens, createIdToken, createLogoutStatusJwt, getGrantType, getSub, revokeAllTokens, save
-
Field Details
-
appConfiguration
@Inject protected io.jans.as.model.configuration.AppConfiguration appConfiguration -
scopeChecker
-
txTokens
-
accessTokens
-
refreshTokens
-
logoutStatusJwts
-
-
Constructor Details
-
AbstractAuthorizationGrant
protected AbstractAuthorizationGrant() -
AbstractAuthorizationGrant
protected AbstractAuthorizationGrant(io.jans.as.common.model.common.User user, AuthorizationGrantType authorizationGrantType, io.jans.as.common.model.registration.Client client, Date authenticationTime)
-
-
Method Details
-
init
protected void init(io.jans.as.common.model.common.User user, AuthorizationGrantType authorizationGrantType, io.jans.as.common.model.registration.Client client, Date authenticationTime) -
getReferenceId
-
setReferenceId
-
isAuthorizationChallenge
public boolean isAuthorizationChallenge() -
setAuthorizationChallenge
-
getStatusListIndex
-
setStatusListIndex
-
getDpopJkt
-
setDpopJkt
-
getGrantId
- Specified by:
getGrantIdin interfaceIAuthorizationGrant
-
setGrantId
- Specified by:
setGrantIdin interfaceIAuthorizationGrant
-
getAuthorizationCode
Returns theAuthorizationCode.- Specified by:
getAuthorizationCodein interfaceIAuthorizationGrant- Returns:
- The authorization code.
-
setAuthorizationCode
Sets theAuthorizationCode.- Specified by:
setAuthorizationCodein interfaceIAuthorizationGrant- Parameters:
authorizationCode- The authorization code.
-
getTokenBindingHash
-
setTokenBindingHash
-
getX5ts256
-
setX5ts256
-
getNonce
- Specified by:
getNoncein interfaceIAuthorizationGrant
-
setNonce
- Specified by:
setNoncein interfaceIAuthorizationGrant
-
getCodeChallenge
-
setCodeChallenge
-
getCodeChallengeMethod
-
setCodeChallengeMethod
-
getClaims
-
setClaims
-
getRefreshTokensCodes
Returns a list with all the issued refresh tokens codes.- Specified by:
getRefreshTokensCodesin interfaceIAuthorizationGrant- Returns:
- List with all the issued refresh tokens codes.
-
getLogoutStatusJwtsCodes
Returns a list with all the issued logout status jwts.- Specified by:
getLogoutStatusJwtsCodesin interfaceIAuthorizationGrant- Returns:
- List with all the issued logout status jwts.
-
getAccessTokensCodes
Returns a list with all the issued access tokens codes.- Specified by:
getAccessTokensCodesin interfaceIAuthorizationGrant- Returns:
- List with all the issued access tokens codes.
-
getAccessTokens
Returns a list with all the issued access tokens.- Specified by:
getAccessTokensin interfaceIAuthorizationGrant- Returns:
- List with all the issued access tokens.
-
getTxTokens
-
getTxToken
-
setScopes
- Specified by:
setScopesin interfaceIAuthorizationGrant
-
getLongLivedAccessToken
- Specified by:
getLongLivedAccessTokenin interfaceIAuthorizationGrant
-
setLongLivedAccessToken
- Specified by:
setLongLivedAccessTokenin interfaceIAuthorizationGrant
-
getIdToken
- Specified by:
getIdTokenin interfaceIAuthorizationGrant
-
setIdToken
- Specified by:
setIdTokenin interfaceIAuthorizationGrant
-
getTokenEntity
public io.jans.model.token.TokenEntity getTokenEntity()- Specified by:
getTokenEntityin interfaceIAuthorizationGrant
-
setTokenEntity
public void setTokenEntity(io.jans.model.token.TokenEntity tokenEntity) - Specified by:
setTokenEntityin interfaceIAuthorizationGrant
-
getUser
public io.jans.as.common.model.common.User getUser()Returns the resource owner's.- Specified by:
getUserin interfaceIAuthorizationGrant- Returns:
- The resource owner's.
-
getAcrValues
- Specified by:
getAcrValuesin interfaceIAuthorizationGrant
-
setAcrValues
- Specified by:
setAcrValuesin interfaceIAuthorizationGrant
-
getSessionDn
- Specified by:
getSessionDnin interfaceIAuthorizationGrant
-
setSessionDn
- Specified by:
setSessionDnin interfaceIAuthorizationGrant
-
checkScopesPolicy
Checks the scopes policy configured according to the type of the authorization grant to limit the issued token scopes.- Specified by:
checkScopesPolicyin interfaceIAuthorizationGrant- Parameters:
requestedScopes- A space-delimited list of values in which the order of values does not matter.- Returns:
- A space-delimited list of scopes
-
getAccessTokenLifetimeInSeconds
-
createAccessToken
- Specified by:
createAccessTokenin interfaceIAuthorizationGrant
-
createRefreshToken
- Specified by:
createRefreshTokenin interfaceIAuthorizationGrant
-
createRefreshToken
- Specified by:
createRefreshTokenin interfaceIAuthorizationGrant
-
getUserId
- Specified by:
getUserIdin interfaceIAuthorizationGrant
-
getUserDn
- Specified by:
getUserDnin interfaceIAuthorizationGrant
-
getAuthorizationGrantType
Returns theAuthorizationGrantType.- Specified by:
getAuthorizationGrantTypein interfaceIAuthorizationGrant- Returns:
- The authorization grant type.
-
getClient
public io.jans.as.common.model.registration.Client getClient()Returns theClient. An application making protected resource requests on behalf of the resource owner and with its authorization.- Specified by:
getClientin interfaceIAuthorizationGrant- Returns:
- The client.
-
getClientId
- Specified by:
getClientIdin interfaceIAuthorizationGrant
-
getClientDn
- Specified by:
getClientDnin interfaceIAuthorizationGrant
-
getAuthenticationTime
- Specified by:
getAuthenticationTimein interfaceIAuthorizationGrant
-
setAuthenticationTime
-
getScopes
Returns a list of the scopes granted to the client.- Specified by:
getScopesin interfaceIAuthorizationGrant- Returns:
- List of the scopes granted to the client.
-
getAuthzDetailsAsString
-
getAuthzDetails
public io.jans.as.model.authzdetails.AuthzDetails getAuthzDetails() -
setAuthzDetails
public void setAuthzDetails(io.jans.as.model.authzdetails.AuthzDetails authzDetails) -
getJwtAuthorizationRequest
- Specified by:
getJwtAuthorizationRequestin interfaceIAuthorizationGrant
-
setJwtAuthorizationRequest
- Specified by:
setJwtAuthorizationRequestin interfaceIAuthorizationGrant
-
setAccessTokens
- Specified by:
setAccessTokensin interfaceIAuthorizationGrant
-
setTxTokens
- Specified by:
setTxTokensin interfaceIAuthorizationGrant
-
getLogoutStatusJwts
Returns a list with all the issued logout status jwts.- Specified by:
getLogoutStatusJwtsin interfaceIAuthorizationGrant- Returns:
- List with all the issued logout status jwts.
-
setLogoutStatusJwts
- Specified by:
setLogoutStatusJwtsin interfaceIAuthorizationGrant
-
getLogoutStatusJwt
Gets the logout out jwt instance from the logout status jwt list given its code.- Specified by:
getLogoutStatusJwtin interfaceIAuthorizationGrant- Parameters:
logoutStatusJwtCode- The code of the logout status jwt.- Returns:
- The logout status jwt instance or
nullif not found.
-
getRefreshTokens
Returns a list with all the issued refresh tokens.- Specified by:
getRefreshTokensin interfaceIAuthorizationGrant- Returns:
- List with all the issued refresh tokens.
-
setRefreshTokens
- Specified by:
setRefreshTokensin interfaceIAuthorizationGrant
-
getRefreshToken
Gets the refresh token instance from the refresh token list given its code.- Specified by:
getRefreshTokenin interfaceIAuthorizationGrant- Parameters:
refreshTokenCode- The code of the refresh token.- Returns:
- The refresh token instance or
nullif not found.
-
getAccessToken
Gets the access token instance from the id token list or the access token list given its code.- Specified by:
getAccessTokenin interfaceIAuthorizationGrant- Parameters:
tokenCode- The code of the access token.- Returns:
- The access token instance or
nullif not found.
-
toString
-