All Downloads are FREE. Search and download functionalities are using the official Maven repository.

no.nrk.ietf.rfc6749.oauth2.AccessTokenResponse Maven / Gradle / Ivy

package no.nrk.ietf.rfc6749.oauth2;

import java.time.Duration;
import java.util.Optional;

/**
 * Access Token Response as defined in RFC6749 section
 * 5.1.
 */
public abstract class AccessTokenResponse {

	/**
	 * 
REQUIRED. The type of the token issued as described in * Section 7.1. Value is case insensitive.
*/ public abstract String tokenType(); /** *
REQUIRED. The access token issued by the authorization * server.
*/ public abstract String accessToken(); /** *
OPTIONAL. The refresh token, which can be used to obtain new * access tokens using the same authorization grant as described in Section * 6.
*/ public abstract Optional refreshToken(); /** *

*

OPTIONAL, if identical to the scope requested by the client; * otherwise, REQUIRED. The scope of the access token as described by * Section 3.3.
*

*/ public abstract Optional scope(); /** *
RECOMMENDED. The lifetime in seconds of the access token. For * example, the value "3600" denotes that the access token will expire in * one hour from the time the response was generated. If omitted, the * authorization server SHOULD provide the expiration time via other means * or document the default value.
*/ public abstract Optional expiresIn(); /** * Used with implicit grants. * *

* From section * 4.2.2:

REQUIRED if the "state" parameter was present in * the client authorization request. The exact value received from the * client.
*

*/ public abstract Optional state(); /** * Read any parameter from the access token response, also custom parameters * that are not defined by the OAuth2 spec. */ public abstract Optional parameter(String name); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy