Package com.nimbusds.oauth2.sdk.token
Class TypelessAccessToken
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.id.Identifier
-
- com.nimbusds.oauth2.sdk.token.Token
-
- com.nimbusds.oauth2.sdk.token.AccessToken
-
- com.nimbusds.oauth2.sdk.token.TypelessAccessToken
-
- All Implemented Interfaces:
Serializable,Comparable<Identifier>,net.minidev.json.JSONAware
@Immutable public class TypelessAccessToken extends AccessToken
Typeless access token, cannot be serialised. Intended to represent parsed access tokens which type cannot be inferred.Related specifications:
- OAuth 2.0 (RFC 6749), sections 1.4 and 5.1.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
-
Constructor Summary
Constructors Constructor Description TypelessAccessToken(String value)Creates a new minimal typeless access token with the specified value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)StringtoAuthorizationHeader()Operation not supported.net.minidev.json.JSONObjecttoJSONObject()Operation not supported.-
Methods inherited from class com.nimbusds.oauth2.sdk.token.AccessToken
getLifetime, getParameterNames, getScope, getType, parse, parse, toJSONString
-
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, getValue, hashCode, toString, toStringList
-
-
-
-
Constructor Detail
-
TypelessAccessToken
public TypelessAccessToken(String value)
Creates a new minimal typeless access token with the specified value. The optional lifetime and scope are left undefined.- Parameters:
value- The access token value. Must not benullor empty string.
-
-
Method Detail
-
toJSONObject
public net.minidev.json.JSONObject toJSONObject()
Operation not supported.- Overrides:
toJSONObjectin classAccessToken- Returns:
- The token parameters as a JSON object.
- Throws:
UnsupportedOperationException- Serialisation is not supported.
-
toAuthorizationHeader
public String toAuthorizationHeader()
Operation not supported.- Specified by:
toAuthorizationHeaderin classAccessToken- Returns:
- The
Authorizationheader value. - Throws:
UnsupportedOperationException- Serialisation is not supported.
-
equals
public boolean equals(Object object)
- Overrides:
equalsin classIdentifier
-
-