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
@Immutable public class AuthRequestID extends Identifier
CIBA request ID (auth_req_id).Related specifications:
- OpenID Connect CIBA Flow - Core 1.0, section 7.3.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static PatternALLOWED_CHARS_PATTERNPattern that matches allowed characters only.static intMIN_BYTE_LENGTHThe minimal required entropy (128 bits or 16 bytes).static intRECOMMENDED_BYTE_LENGTHThe recommended entropy (160 bits or 20 bytes).-
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
-
Constructor Summary
Constructors Constructor Description AuthRequestID()Creates 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)static AuthRequestIDparse(String value)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 Detail
-
MIN_BYTE_LENGTH
public static final int MIN_BYTE_LENGTH
The minimal required entropy (128 bits or 16 bytes).- See Also:
- Constant Field Values
-
RECOMMENDED_BYTE_LENGTH
public static final int RECOMMENDED_BYTE_LENGTH
The recommended entropy (160 bits or 20 bytes).- See Also:
- Constant Field Values
-
ALLOWED_CHARS_PATTERN
public static final Pattern ALLOWED_CHARS_PATTERN
Pattern that matches allowed characters only.
-
-
Constructor Detail
-
AuthRequestID
public AuthRequestID()
Creates a new CIBA request ID with a randomly generated 160-bit (20-byte) value (therecommended length), Base64URL-encoded.
-
AuthRequestID
public AuthRequestID(int byteLength)
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
public AuthRequestID(String value)
Creates a new CIBA request ID with the specified value.- Parameters:
value- The CIBA request ID value. Must contain onlylegal charactersonly and not benullor empty string.
-
-
Method Detail
-
equals
public boolean equals(Object object)
- Overrides:
equalsin classIdentifier
-
parse
public static AuthRequestID parse(String value) throws ParseException
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.
-
-