Class ResourceOwnerPasswordCredentialsGrant
- All Implemented Interfaces:
IAuthorizationGrant
The resource owner password credentials (i.e. username and password) can be used directly as an authorization grant to obtain an access token. The credentials should only be used when there is a high degree of trust between the resource owner and the client (e.g. its device operating system or a highly privileged application), and when other authorization grant types are not available (such as an authorization code).
Even though this grant type requires direct client access to the resource owner credentials, the resource owner credentials are used for a single request and are exchanged for an access token. This grant type can eliminate the need for the client to store the resource owner credentials for future use, by exchanging the credentials with a long-lived access token or refresh token.
- Author:
- Javier Rojas Blum Date: 09.29.2011, Yuriy Movchan
-
Field Summary
Fields inherited from class io.jans.as.server.model.common.AbstractAuthorizationGrant
accessTokens, appConfiguration, logoutStatusJwts, refreshTokens, scopeChecker, txTokens
-
Constructor Summary
ConstructorsConstructorDescriptionResourceOwnerPasswordCredentialsGrant
(io.jans.as.common.model.common.User user, io.jans.as.common.model.registration.Client client) Constructs a resource owner password credentials grant. -
Method Summary
Modifier and TypeMethodDescriptionio.jans.as.model.common.GrantType
void
init
(io.jans.as.common.model.common.User user, io.jans.as.common.model.registration.Client client) Methods inherited from class io.jans.as.server.model.common.AuthorizationGrant
asToken, asToken, asToken, asToken, asToken, asToken, asTokenEntity, checkExpiredTokens, checkScopesPolicy, createAccessToken, createAccessTokenAsJwt, createIdToken, createLogoutStatusJwt, createRefreshToken, createRefreshToken, createRefreshToken, fillPayloadOfAccessTokenJwt, getScopesAsString, getSub, init, isCachedWithNoPersistence, isImplicitFlow, persist, persist, revokeAllTokens, save, setIsCachedWithNoPersistence
Methods inherited from class io.jans.as.server.model.common.AbstractAuthorizationGrant
getAccessToken, getAccessTokenLifetimeInSeconds, getAccessTokens, getAccessTokensCodes, getAcrValues, getAuthenticationTime, getAuthorizationCode, getAuthorizationGrantType, getAuthzDetails, getAuthzDetailsAsString, getClaims, getClient, getClientDn, getClientId, getCodeChallenge, getCodeChallengeMethod, getDpopJkt, getGrantId, getIdToken, getJwtAuthorizationRequest, getLogoutStatusJwt, getLogoutStatusJwts, getLogoutStatusJwtsCodes, getLongLivedAccessToken, getNonce, getReferenceId, getRefreshToken, getRefreshTokens, getRefreshTokensCodes, getScopes, getSessionDn, getStatusListIndex, getTokenBindingHash, getTokenEntity, getTxToken, getTxTokens, getUser, getUserDn, getUserId, getX5ts256, isAuthorizationChallenge, setAccessTokens, setAcrValues, setAuthenticationTime, setAuthorizationChallenge, setAuthorizationCode, setAuthzDetails, setClaims, setCodeChallenge, setCodeChallengeMethod, setDpopJkt, setGrantId, setIdToken, setJwtAuthorizationRequest, setLogoutStatusJwts, setLongLivedAccessToken, setNonce, setReferenceId, setRefreshTokens, setScopes, setSessionDn, setStatusListIndex, setTokenBindingHash, setTokenEntity, setTxTokens, setX5ts256, toString
-
Constructor Details
-
ResourceOwnerPasswordCredentialsGrant
public ResourceOwnerPasswordCredentialsGrant() -
ResourceOwnerPasswordCredentialsGrant
public ResourceOwnerPasswordCredentialsGrant(io.jans.as.common.model.common.User user, io.jans.as.common.model.registration.Client client) Constructs a resource owner password credentials grant.- Parameters:
user
- The resource owner.client
- An application making protected resource requests on behalf of the resource owner and with its authorization.
-
-
Method Details
-
init
public void init(io.jans.as.common.model.common.User user, io.jans.as.common.model.registration.Client client) -
getGrantType
public io.jans.as.model.common.GrantType getGrantType()
-