Class RefreshTokenSpec
- java.lang.Object
-
- com.nimbusds.openid.connect.provider.spi.grants.TokenSpec
-
- com.nimbusds.openid.connect.provider.spi.grants.OptionalTokenSpec
-
- com.nimbusds.openid.connect.provider.spi.grants.RefreshTokenSpec
-
@Immutable public class RefreshTokenSpec extends OptionalTokenSpec
Refresh token specification.
-
-
Field Summary
Fields Modifier and Type Field Description static RefreshTokenSpec
DEFAULT
Default refresh token specification (no issue).
-
Constructor Summary
Constructors Constructor Description RefreshTokenSpec()
Creates a new default refresh token specification (no issue).RefreshTokenSpec(boolean issue, long lifetime)
Creates a new refresh token specification.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RefreshTokenSpec
parse(net.minidev.json.JSONObject o)
Parses a refresh token specification from the specified JSON object.-
Methods inherited from class com.nimbusds.openid.connect.provider.spi.grants.OptionalTokenSpec
issue, toJSONObject
-
Methods inherited from class com.nimbusds.openid.connect.provider.spi.grants.TokenSpec
getAudience, getImpersonatedSubject, getLifetime, toString
-
-
-
-
Field Detail
-
DEFAULT
public static final RefreshTokenSpec DEFAULT
Default refresh token specification (no issue).
-
-
Constructor Detail
-
RefreshTokenSpec
public RefreshTokenSpec()
Creates a new default refresh token specification (no issue).
-
RefreshTokenSpec
public RefreshTokenSpec(boolean issue, long lifetime)
Creates a new refresh token specification.- Parameters:
issue
- Controls the refresh token issue. Iftrue
a refresh token must be issued (requires a long-lived authorisation),false
to prohibit issue.lifetime
- The refresh token lifetime, in seconds. Zero implies permanent (no expiration) and negative not specified (to let the Connect2id server apply the default configured refresh token lifetime). Applies only if a refresh token is issued.
-
-
Method Detail
-
parse
public static RefreshTokenSpec parse(net.minidev.json.JSONObject o) throws com.nimbusds.oauth2.sdk.ParseException
Parses a refresh token specification from the specified JSON object.- Parameters:
o
- The JSON object. Must not benull
.- Returns:
- The refresh token specification.
- Throws:
com.nimbusds.oauth2.sdk.ParseException
- If parsing failed.
-
-