Package org.opencastproject.security.jwt
Class AlgorithmBuilder
- java.lang.Object
-
- org.opencastproject.security.jwt.AlgorithmBuilder
-
public final class AlgorithmBuilder extends Object
Helper class to buildAlgorithmobjects.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
RS256
public static final String RS256
- See Also:
- Constant Field Values
-
RS384
public static final String RS384
- See Also:
- Constant Field Values
-
RS512
public static final String RS512
- See Also:
- Constant Field Values
-
ES256
public static final String ES256
- See Also:
- Constant Field Values
-
ES256K
public static final String ES256K
- See Also:
- Constant Field Values
-
ES384
public static final String ES384
- See Also:
- Constant Field Values
-
ES512
public static final String ES512
- See Also:
- Constant Field Values
-
HS256
public static final String HS256
- See Also:
- Constant Field Values
-
HS384
public static final String HS384
- See Also:
- Constant Field Values
-
HS512
public static final String HS512
- See Also:
- Constant Field Values
-
-
Method Detail
-
buildAlgorithm
public static com.auth0.jwt.algorithms.Algorithm buildAlgorithm(com.auth0.jwk.Jwk jwk) throws com.auth0.jwk.JwkExceptionBuild 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
public static com.auth0.jwt.algorithms.Algorithm buildAlgorithm(String alg, PublicKey publicKey)
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.
-
-