Class AccessToken
- java.lang.Object
-
- io.jans.as.server.model.common.AbstractToken
-
- io.jans.as.server.model.common.AccessToken
-
- All Implemented Interfaces:
io.jans.orm.model.base.Deletable
,Serializable
public class AccessToken extends AbstractToken
Access token (as well as any access token type-specific attributes) MUST be kept confidential in transit and storage, and only shared among the authorization server, the resource servers the access token is valid for, and the client to whom the access token is issued.
When using the implicit grant type, the access token is transmitted in the URI fragment, which can expose it to unauthorized parties.
The authorization server MUST ensure that access tokens cannot be generated, modified, or guessed to produce valid access tokens by unauthorized parties.
The client SHOULD request access tokens with the minimal scope and lifetime necessary. The authorization server SHOULD take the client identity into account when choosing how to honor the requested scope and lifetime, and MAY issue an access token with a less rights than requested.
- Version:
- September 30, 2021
- Author:
- Javier Rojas Blum
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AccessToken(int lifeTime)
Constructs an access token.AccessToken(String tokenCode, Date creationDate, Date expirationDate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.jans.as.model.common.TokenType
getTokenType()
Returns theTokenType
.void
setTokenType(io.jans.as.model.common.TokenType tokenType)
Sets theTokenType
-
Methods inherited from class io.jans.as.server.model.common.AbstractToken
checkExpired, checkExpired, getCode, getCreationDate, getDpop, getExpirationDate, getExpiresIn, getHash, getReferenceId, getSessionDn, getStatusListIndex, getTtl, getX5ts256, isDeletable, isExpired, isRevoked, isValid, resetTtlFromExpirationDate, setCode, setCreationDate, setDeletable, setDpop, setExpirationDate, setExpired, setReferenceId, setRevoked, setSessionDn, setStatusListIndex, setX5ts256
-
-
-
-
Constructor Detail
-
AccessToken
public AccessToken(int lifeTime)
Constructs an access token.
When created, a token is valid for a given lifetime, and after this period of time, it will be marked as expired automatically by a background process.
When required, the token can be marked as revoked.
- Parameters:
lifeTime
- The life time of the token.
-
-