Package io.jans.as.client
Class TokenRequest
- java.lang.Object
- 
- io.jans.as.client.BaseRequest
- 
- io.jans.as.client.ClientAuthnRequest
- 
- io.jans.as.client.TokenRequest
 
 
 
- 
 public class TokenRequest extends ClientAuthnRequest Represents a token request to send to the authorization server.- Version:
- September 30, 2021
- Author:
- Javier Rojas Blum
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classTokenRequest.Builder
 - 
Constructor SummaryConstructors Constructor Description TokenRequest(io.jans.as.model.common.GrantType grantType)Constructs a token request.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TokenRequest.Builderbuilder()java.lang.StringgetAssertion()Returns the assertion.java.lang.StringgetAuthReqId()java.lang.StringgetCode()Returns the authorization code.java.lang.StringgetCodeVerifier()Gets PKCE code verifier.java.lang.StringgetDeviceCode()io.jans.as.model.jwt.DPoPgetDpop()io.jans.as.model.common.GrantTypegetGrantType()Returns the grant type.java.util.Map<java.lang.String,java.lang.String>getParameters()Returns a collection of parameters of the token request.java.lang.StringgetPassword()Returns the password.java.lang.StringgetQueryString()Returns a query string with the parameters of the authorization request.java.lang.StringgetRedirectUri()Returns the redirect URI.java.lang.StringgetRefreshToken()Returns the refresh token.java.lang.StringgetScope()Returns the scope.java.lang.StringgetUsername()Returns the username.voidsetAssertion(java.lang.String assertion)Sets the assertion.voidsetAuthReqId(java.lang.String authReqId)voidsetCode(java.lang.String code)Sets the authorization code.voidsetCodeVerifier(java.lang.String codeVerifier)Sets PKCE code verifier.voidsetDeviceCode(java.lang.String deviceCode)voidsetDpop(io.jans.as.model.jwt.DPoP dpop)voidsetGrantType(io.jans.as.model.common.GrantType grantType)Sets the grant type.voidsetPassword(java.lang.String password)Sets the password.voidsetRedirectUri(java.lang.String redirectUri)Sets the redirect URI.voidsetRefreshToken(java.lang.String refreshToken)Sets the refresh token.voidsetScope(java.lang.String scope)Sets the scope.voidsetUsername(java.lang.String username)Sets the username.static TokenRequest.BuilderumaBuilder()- 
Methods inherited from class io.jans.as.client.ClientAuthnRequestappendClientAuthnToQuery, getAlgorithm, getAudience, getClientAssertion, getCryptoProvider, getKeyId, getSharedKey, setAlgorithm, setAudience, setCryptoProvider, setKeyId, setSharedKey
 - 
Methods inherited from class io.jans.as.client.BaseRequestaddCustomParameter, getAuthenticationMethod, getAuthorizationMethod, getAuthPassword, getAuthUsername, getContentType, getCredentials, getCustomParameters, getEncodedCredentials, getEncodedCredentials, getJSONParameters, getMediaType, hasCredentials, setAuthenticationMethod, setAuthorizationMethod, setAuthPassword, setAuthUsername, setContentType, setMediaType
 
- 
 
- 
- 
- 
Method Detail- 
builderpublic static TokenRequest.Builder builder() 
 - 
umaBuilderpublic static TokenRequest.Builder umaBuilder() 
 - 
getGrantTypepublic io.jans.as.model.common.GrantType getGrantType() Returns the grant type.- Returns:
- The grant type.
 
 - 
setGrantTypepublic void setGrantType(io.jans.as.model.common.GrantType grantType) Sets the grant type.- Parameters:
- grantType- The grant type.
 
 - 
getCodepublic java.lang.String getCode() Returns the authorization code.- Returns:
- The authorization code.
 
 - 
setCodepublic void setCode(java.lang.String code) Sets the authorization code.- Parameters:
- code- The authorization code.
 
 - 
getCodeVerifierpublic java.lang.String getCodeVerifier() Gets PKCE code verifier.- Returns:
- code verifier
 
 - 
setCodeVerifierpublic void setCodeVerifier(java.lang.String codeVerifier) Sets PKCE code verifier.- Parameters:
- codeVerifier- code verifier
 
 - 
getRedirectUripublic java.lang.String getRedirectUri() Returns the redirect URI.- Returns:
- The redirect URI.
 
 - 
setRedirectUripublic void setRedirectUri(java.lang.String redirectUri) Sets the redirect URI.- Parameters:
- redirectUri- The redirect URI.
 
 - 
getUsernamepublic java.lang.String getUsername() Returns the username.- Returns:
- The username.
 
 - 
setUsernamepublic void setUsername(java.lang.String username) Sets the username.- Parameters:
- username- The username.
 
 - 
getPasswordpublic java.lang.String getPassword() Returns the password.- Returns:
- The password.
 
 - 
setPasswordpublic void setPassword(java.lang.String password) Sets the password.- Parameters:
- password- The password.
 
 - 
getScopepublic java.lang.String getScope() Returns the scope.- Returns:
- The scope.
 
 - 
setScopepublic void setScope(java.lang.String scope) Sets the scope.- Parameters:
- scope- The scope.
 
 - 
getAssertionpublic java.lang.String getAssertion() Returns the assertion.- Returns:
- The assertion.
 
 - 
setAssertionpublic void setAssertion(java.lang.String assertion) Sets the assertion.- Parameters:
- assertion- The assertion.
 
 - 
getRefreshTokenpublic java.lang.String getRefreshToken() Returns the refresh token.- Returns:
- The refresh token.
 
 - 
setRefreshTokenpublic void setRefreshToken(java.lang.String refreshToken) Sets the refresh token.- Parameters:
- refreshToken- The refresh token.
 
 - 
getAuthReqIdpublic java.lang.String getAuthReqId() 
 - 
setAuthReqIdpublic void setAuthReqId(java.lang.String authReqId) 
 - 
getDeviceCodepublic java.lang.String getDeviceCode() 
 - 
setDeviceCodepublic void setDeviceCode(java.lang.String deviceCode) 
 - 
getDpoppublic io.jans.as.model.jwt.DPoP getDpop() 
 - 
setDpoppublic void setDpop(io.jans.as.model.jwt.DPoP dpop) 
 - 
getQueryStringpublic java.lang.String getQueryString() Returns a query string with the parameters of the authorization request. Anynullor empty parameter will be omitted.- Specified by:
- getQueryStringin class- BaseRequest
- Returns:
- A query string of parameters.
 
 - 
getParameterspublic java.util.Map<java.lang.String,java.lang.String> getParameters() Returns a collection of parameters of the token request. Anynullor empty parameter will be omitted.- Overrides:
- getParametersin class- BaseRequest
- Returns:
- A collection of parameters.
 
 
- 
 
-