Class StateHash
java.lang.Object
com.nimbusds.oauth2.sdk.id.Identifier
com.nimbusds.openid.connect.sdk.claims.HashClaim
com.nimbusds.openid.connect.sdk.claims.StateHash
- All Implemented Interfaces:
Serializable,Comparable<Identifier>,net.minidev.json.JSONAware
State hash (
s_hash).
Related specifications:
- Financial Services – Financial API - Part 2: Read and Write API Security Profile, section 5.1.
- See Also:
-
Field Summary
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.nimbusds.openid.connect.sdk.claims.HashClaim
computeValue, computeValue, getMessageDigestInstance, getMessageDigestInstanceMethods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, getValue, hashCode, toJSONString, toString, toStringList
-
Constructor Details
-
StateHash
Creates a new state hash with the specified value.- Parameters:
value- The state hash value. Must not benull.
-
-
Method Details
-
compute
Deprecated.Usecompute(State, JWSAlgorithm, Curve)instead.Computes the hash for the specified state and reference JSON Web Signature (JWS) algorithm.- Parameters:
state- The state. Must not benull.alg- The reference JWS algorithm. Must not benull.- Returns:
- The state hash, or
nullif the JWS algorithm is not supported.
-
compute
public static StateHash compute(State state, com.nimbusds.jose.JWSAlgorithm alg, com.nimbusds.jose.jwk.Curve crv) Computes the hash for the specified state and reference JSON Web Signature (JWS) algorithm.- Parameters:
state- The state. Must not benull.alg- The reference JWS algorithm. Must not benull.crv- The JWK curve used with the JWS algorithm,nullif not applicable.- Returns:
- The state hash, or
nullif the JWS algorithm is not supported.
-
equals
- Overrides:
equalsin classIdentifier
-
compute(State, JWSAlgorithm, Curve)instead.