Module io.inverno.mod.security.jose
Package io.inverno.mod.security.jose.jwe
Class JWEAuthentication<A extends Authentication>
java.lang.Object
io.inverno.mod.security.jose.jwe.JWEAuthentication<A>
- Type Parameters:
A- the original authentication type
- All Implemented Interfaces:
Authentication,TokenAuthentication
public class JWEAuthentication<A extends Authentication>
extends Object
implements TokenAuthentication
A token authentication that wraps the original authentication in a JWE and uses its compact representation as token value.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Constructor Summary
ConstructorsConstructorDescriptionJWEAuthentication(JWE<A> jwe) Creates a JWE authentication with the specified JWE.Creates a denied JWE authentication with the specified security error. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.inverno.mod.security.authentication.Authentication
isAnonymous
-
Constructor Details
-
JWEAuthentication
Creates a JWE authentication with the specified JWE.
- Parameters:
jwe- a JWE wrapping the original authentication
-
JWEAuthentication
Creates a denied JWE authentication with the specified security error.
- Parameters:
cause- a security error or null
-
-
Method Details
-
getJwe
Returns the JWE.
- Returns:
- the JWE or null if unauthenticated
-
getToken
Returns the JWE compact representation.
- Specified by:
getTokenin interfaceTokenAuthentication- Returns:
- the JWE compact representation or null if unauthenticated
-
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticatedin interfaceAuthentication
-
getCause
- Specified by:
getCausein interfaceAuthentication
-