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
Refresh token specification.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final RefreshTokenSpec
Default refresh token specification (no issue). -
Constructor Summary
ConstructorDescriptionCreates a new default refresh token specification (no issue).RefreshTokenSpec
(boolean issue, long lifetime) Creates a new refresh token specification.RefreshTokenSpec
(boolean issue, long lifetime, long maxIdleTime, Optional<Boolean> rotate) Creates a new refresh token specification.RefreshTokenSpec
(boolean issue, long lifetime, Optional<Boolean> rotate) Creates a new refresh token specification. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the refresh token maximum idle time.Returns the optional refresh token rotation preference.static RefreshTokenSpec
parse
(net.minidev.json.JSONObject o) Parses a refresh token specification from the specified JSON object.net.minidev.json.JSONObject
Returns a JSON object representation of this token specification.Methods inherited from class com.nimbusds.openid.connect.provider.spi.grants.OptionalTokenSpec
issue
Methods inherited from class com.nimbusds.openid.connect.provider.spi.grants.TokenSpec
getAudience, getImpersonatedSubject, getLifetime, toString
-
Field Details
-
DEFAULT
Default refresh token specification (no issue).
-
-
Constructor Details
-
RefreshTokenSpec
public RefreshTokenSpec()Creates a new default refresh token specification (no issue). -
RefreshTokenSpec
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 maximum lifetime, in seconds. Zero means no lifetime limit. Negative means not specified (to let the Connect2id server apply the default configured refresh token lifetime). Applies only when a refresh token is issued.
-
RefreshTokenSpec
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 maximum lifetime, in seconds. Zero means no lifetime limit. Negative means not specified (to let the Connect2id server apply the default configured refresh token lifetime). Applies only when a refresh token is issued.rotate
- The optional rotation preference, if none the default refresh token rotation policy will apply.
-
RefreshTokenSpec
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 maximum lifetime, in seconds. Zero means no lifetime limit. Negative means not specified (to let the Connect2id server apply the default configured refresh token lifetime). Applies only when a refresh token is issued.maxIdleTime
- The refresh token maximum idle time, in seconds. Zero means no idle time expiration.rotate
- The optional rotation preference, if none the default refresh token rotation policy will apply.
-
-
Method Details
-
getMaxIdleTime
Returns the refresh token maximum idle time.- Returns:
- The maximum idle time, in seconds. Zero means no idle time expiration.
-
getRotate
Returns the optional refresh token rotation preference.- Returns:
- The rotation preference, if none the default refresh token rotation policy will apply.
-
toJSONObject
Description copied from class:TokenSpec
Returns a JSON object representation of this token specification.- Overrides:
toJSONObject
in classOptionalTokenSpec
- Returns:
- The JSON object.
-
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.
-