public class TokenSpec extends Object
Constructor and Description |
---|
TokenSpec(long lifetime)
Creates a new token specification.
|
Modifier and Type | Method and Description |
---|---|
long |
getLifetime()
Returns the token lifetime.
|
static TokenSpec |
parse(net.minidev.json.JSONObject o)
Parses a token specification from the specified JSON object.
|
net.minidev.json.JSONObject |
toJSONObject()
Returns a JSON object representation of this token specification.
|
public TokenSpec(long lifetime)
lifetime
- The token lifetime, in seconds. Zero implies
permanent or not specified (to apply the default
configured token lifetime), depending on the token
type. Must not be negative integer.public long getLifetime()
public net.minidev.json.JSONObject toJSONObject()
public static TokenSpec parse(net.minidev.json.JSONObject o) throws com.nimbusds.oauth2.sdk.ParseException
o
- The JSON object. Must not be null
.com.nimbusds.oauth2.sdk.ParseException
- If parsing failed.Copyright © 2015 Connect2id Ltd.. All Rights Reserved.