com.auth0.jwt
Class JWTSigner.Options

java.lang.Object
  extended by com.auth0.jwt.JWTSigner.Options
Enclosing class:
JWTSigner

public static class JWTSigner.Options
extends Object

An option object for JWT signing operation. Allow choosing the algorithm, and/or specifying claims to be automatically set.


Constructor Summary
JWTSigner.Options()
           
 
Method Summary
 Algorithm getAlgorithm()
           
 Integer getExpirySeconds()
           
 Integer getNotValidBeforeLeeway()
           
 boolean isIssuedAt()
           
 boolean isJwtId()
           
 JWTSigner.Options setAlgorithm(Algorithm algorithm)
          Algorithm to sign JWT with.
 JWTSigner.Options setExpirySeconds(Integer expirySeconds)
          Set JWT claim "exp" to current timestamp plus this value.
 JWTSigner.Options setIssuedAt(boolean issuedAt)
          Set JWT claim "iat" to current timestamp.
 JWTSigner.Options setJwtId(boolean jwtId)
          Set JWT claim "jti" to a pseudo random unique value (type 4 UUID).
 JWTSigner.Options setNotValidBeforeLeeway(Integer notValidBeforeLeeway)
          Set JWT claim "nbf" to current timestamp minus this value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JWTSigner.Options

public JWTSigner.Options()
Method Detail

getAlgorithm

public Algorithm getAlgorithm()

setAlgorithm

public JWTSigner.Options setAlgorithm(Algorithm algorithm)
Algorithm to sign JWT with. Default is HS256.


getExpirySeconds

public Integer getExpirySeconds()

setExpirySeconds

public JWTSigner.Options setExpirySeconds(Integer expirySeconds)
Set JWT claim "exp" to current timestamp plus this value. Overrides content of claims in sign().


getNotValidBeforeLeeway

public Integer getNotValidBeforeLeeway()

setNotValidBeforeLeeway

public JWTSigner.Options setNotValidBeforeLeeway(Integer notValidBeforeLeeway)
Set JWT claim "nbf" to current timestamp minus this value. Overrides content of claims in sign().


isIssuedAt

public boolean isIssuedAt()

setIssuedAt

public JWTSigner.Options setIssuedAt(boolean issuedAt)
Set JWT claim "iat" to current timestamp. Defaults to false. Overrides content of claims in sign().


isJwtId

public boolean isJwtId()

setJwtId

public JWTSigner.Options setJwtId(boolean jwtId)
Set JWT claim "jti" to a pseudo random unique value (type 4 UUID). Defaults to false. Overrides content of claims in sign().



Copyright © 2015. All Rights Reserved.