Package com.nimbusds.oauth2.sdk.ciba
Class AuthRequestID
java.lang.Object
com.nimbusds.oauth2.sdk.id.Identifier
com.nimbusds.oauth2.sdk.ciba.AuthRequestID
- All Implemented Interfaces:
Serializable
,Comparable<Identifier>
,net.minidev.json.JSONAware
CIBA request ID (
auth_req_id
).
Related specifications:
- OpenID Connect CIBA Flow - Core 1.0, section 7.3.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Pattern
Pattern that matches allowed characters only.static final int
The minimal required entropy (128 bits or 16 bytes).static final int
The recommended entropy (160 bits or 20 bytes).Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new CIBA request ID with a randomly generated 160-bit (20-byte) value (therecommended length
), Base64URL-encoded.AuthRequestID
(int byteLength) Creates a new CIBA request ID with a randomly generated value of the specified byte length, Base64URL-encoded.AuthRequestID
(String value) Creates a new CIBA request ID with the specified value. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static AuthRequestID
Parses new CIBA request ID from the specified value.Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, getValue, hashCode, toJSONString, toString, toStringList
-
Field Details
-
MIN_BYTE_LENGTH
The minimal required entropy (128 bits or 16 bytes).- See Also:
-
RECOMMENDED_BYTE_LENGTH
The recommended entropy (160 bits or 20 bytes).- See Also:
-
ALLOWED_CHARS_PATTERN
Pattern that matches allowed characters only.
-
-
Constructor Details
-
AuthRequestID
public AuthRequestID()Creates a new CIBA request ID with a randomly generated 160-bit (20-byte) value (therecommended length
), Base64URL-encoded. -
AuthRequestID
Creates a new CIBA request ID with a randomly generated value of the specified byte length, Base64URL-encoded.- Parameters:
byteLength
- The byte length of the value to generate. Must be at least128 bits (16 bytes) long
.
-
AuthRequestID
Creates a new CIBA request ID with the specified value.- Parameters:
value
- The CIBA request ID value. Must contain onlylegal characters
only and not benull
or empty string.
-
-
Method Details
-
equals
- Overrides:
equals
in classIdentifier
-
parse
Parses new CIBA request ID from the specified value.- Parameters:
value
- The CIBA request ID value.- Returns:
- The CIBA request ID.
- Throws:
ParseException
- On a illegal value.
-