Interface AccessTokenRequest
- All Superinterfaces:
OAuth2Request
An OAuth 2.0 request to obtain an access token.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the grant type of the access request.static AccessTokenRequest
ofClientCredentials
(ClientAuthentication clientAuthentication) Creates a newAccessTokenRequest
that is used to request an access token using only the client credentials, as per RFC 6749, Section 4.4.static AccessTokenRequest
ofClientCredentials
(ClientAuthentication clientAuthentication, List<String> scopes) Creates a newAccessTokenRequest
that is used to request an access token using the client credentials and the scopes, as per RFC 6749, Section 4.4.static AccessTokenRequest
ofClientCredentials
(String clientId, String clientSecret) Creates a newAccessTokenRequest
that is used to request an access token using the client ID and client secret, as per RFC 6749, Section 4.4.static AccessTokenRequest
ofJsonWebToken
(String jsonWebToken) Creates a newAccessTokenRequest
that is used to request an access token using the JSON Web Token (JWT), as per RFC 7523.static AccessTokenRequest
ofJsonWebToken
(String jsonWebToken, @Nullable ClientAuthentication clientAuthentication, @Nullable List<String> scopes) Creates a newAccessTokenRequest
that is used to request an access token using the JSON Web Token (JWT), as per RFC 7523.static AccessTokenRequest
ofJsonWebToken
(String jsonWebToken, ClientAuthentication clientAuthentication) Creates a newAccessTokenRequest
that is used to request an access token using the JSON Web Token (JWT), as per RFC 7523.static AccessTokenRequest
ofResourceOwnerPassword
(String username, String password) Creates a newAccessTokenRequest
that is used to request an access token using the resource owner password credentials, as per RFC 6749, Section 4.3.static AccessTokenRequest
ofResourceOwnerPassword
(String username, String password, @Nullable ClientAuthentication clientAuthentication, @Nullable List<String> scopes) Creates a newAccessTokenRequest
that is used to request an access token using the resource owner password credentials with theClientAuthentication
, as per RFC 6749, Section 4.3.static AccessTokenRequest
ofResourceOwnerPassword
(String username, String password, ClientAuthentication clientAuthentication) Creates a newAccessTokenRequest
that is used to request an access token using the resource owner password credentials with theClientAuthentication
, as per RFC 6749, Section 4.3.scopes()
Returns the scopes of the access request, as per RFC 6749, Section 3.3.Methods inherited from interface com.linecorp.armeria.common.auth.oauth2.OAuth2Request
addBodyParams, asHttpRequest, bodyParams, clientAuthentication
-
Method Details
-
ofClientCredentials
Creates a newAccessTokenRequest
that is used to request an access token using only the client credentials, as per RFC 6749, Section 4.4. -
ofClientCredentials
static AccessTokenRequest ofClientCredentials(ClientAuthentication clientAuthentication, List<String> scopes) Creates a newAccessTokenRequest
that is used to request an access token using the client credentials and the scopes, as per RFC 6749, Section 4.4. -
ofClientCredentials
Creates a newAccessTokenRequest
that is used to request an access token using the client ID and client secret, as per RFC 6749, Section 4.4. The specified client ID and client secret will be encoded and sent as the HTTP Basic authentication header. -
ofResourceOwnerPassword
Creates a newAccessTokenRequest
that is used to request an access token using the resource owner password credentials, as per RFC 6749, Section 4.3. -
ofResourceOwnerPassword
static AccessTokenRequest ofResourceOwnerPassword(String username, String password, ClientAuthentication clientAuthentication) Creates a newAccessTokenRequest
that is used to request an access token using the resource owner password credentials with theClientAuthentication
, as per RFC 6749, Section 4.3. -
ofResourceOwnerPassword
static AccessTokenRequest ofResourceOwnerPassword(String username, String password, @Nullable @Nullable ClientAuthentication clientAuthentication, @Nullable @Nullable List<String> scopes) Creates a newAccessTokenRequest
that is used to request an access token using the resource owner password credentials with theClientAuthentication
, as per RFC 6749, Section 4.3. -
ofJsonWebToken
Creates a newAccessTokenRequest
that is used to request an access token using the JSON Web Token (JWT), as per RFC 7523. -
ofJsonWebToken
static AccessTokenRequest ofJsonWebToken(String jsonWebToken, ClientAuthentication clientAuthentication) Creates a newAccessTokenRequest
that is used to request an access token using the JSON Web Token (JWT), as per RFC 7523. -
ofJsonWebToken
static AccessTokenRequest ofJsonWebToken(String jsonWebToken, @Nullable @Nullable ClientAuthentication clientAuthentication, @Nullable @Nullable List<String> scopes) Creates a newAccessTokenRequest
that is used to request an access token using the JSON Web Token (JWT), as per RFC 7523. -
grantType
String grantType()Returns the grant type of the access request. -
scopes
Returns the scopes of the access request, as per RFC 6749, Section 3.3.
-