Package org.opencastproject.security.jwt
Class AlgorithmBuilder
java.lang.Object
org.opencastproject.security.jwt.AlgorithmBuilder
Helper class to build
Algorithm objects.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic com.auth0.jwt.algorithms.AlgorithmbuildAlgorithm(com.auth0.jwk.Jwk jwk) Build algorithm object from a JSON Web Key.static com.auth0.jwt.algorithms.AlgorithmbuildAlgorithm(com.auth0.jwt.interfaces.DecodedJWT jwt, String secret) Build algorithm object from a decoded JWT and a secret.static com.auth0.jwt.algorithms.AlgorithmbuildAlgorithm(String alg, String secret) Build algorithm object from the 'alg' claim of a JWT and a secret.static com.auth0.jwt.algorithms.AlgorithmbuildAlgorithm(String alg, PublicKey publicKey) Build algorithm object from the 'alg' claim of a JWT and a public key.
-
Field Details
-
RS256
- See Also:
-
RS384
- See Also:
-
RS512
- See Also:
-
ES256
- See Also:
-
ES256K
- See Also:
-
ES384
- See Also:
-
ES512
- See Also:
-
HS256
- See Also:
-
HS384
- See Also:
-
HS512
- See Also:
-
-
Method Details
-
buildAlgorithm
public static com.auth0.jwt.algorithms.Algorithm buildAlgorithm(com.auth0.jwk.Jwk jwk) throws com.auth0.jwk.JwkException Build algorithm object from a JSON Web Key.- Parameters:
jwk- The JSON Web Key.- Returns:
- The corresponding algorithm.
- Throws:
com.auth0.jwk.JwkException- If the algorithm cannot be constructed.
-
buildAlgorithm
Build algorithm object from the 'alg' claim of a JWT and a public key.- Parameters:
alg- The 'alg' claim.publicKey- The public key.- Returns:
- The corresponding algorithm.
-
buildAlgorithm
public static com.auth0.jwt.algorithms.Algorithm buildAlgorithm(com.auth0.jwt.interfaces.DecodedJWT jwt, String secret) Build algorithm object from a decoded JWT and a secret.- Parameters:
jwt- The decoded JWT.secret- The secret.- Returns:
- The corresponding algorithm.
-
buildAlgorithm
Build algorithm object from the 'alg' claim of a JWT and a secret.- Parameters:
alg- The 'alg' claim.secret- The secret.- Returns:
- The corresponding algorithm.
-