Module io.inverno.mod.security.jose
Package io.inverno.mod.security.jose.jws
Class JWSAuthentication<A extends Authentication>
java.lang.Object
io.inverno.mod.security.jose.jws.JWSAuthentication<A>
- Type Parameters:
A- the original authentication type
- All Implemented Interfaces:
Authentication,TokenAuthentication
public class JWSAuthentication<A extends Authentication>
extends Object
implements TokenAuthentication
A token authentication that wraps the original authentication in a JWS and uses its compact representation as token value.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Constructor Summary
ConstructorsConstructorDescriptionJWSAuthentication(JWS<A> jws) Creates a JWS authentication with the specified JWS.Creates a denied JWS 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
-
JWSAuthentication
Creates a JWS authentication with the specified JWS.
- Parameters:
jws- a JWS wrapping the original authentication
-
JWSAuthentication
Creates a denied JWS authentication with the specified security error.
- Parameters:
cause- a security error or null
-
-
Method Details
-
getJws
Returns the JWS.
- Returns:
- the JWS or null if unauthenticated
-
getToken
Returns the JWS compact representation.
- Specified by:
getTokenin interfaceTokenAuthentication- Returns:
- the JWS compact representation or null if unauthenticated
-
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticatedin interfaceAuthentication
-
getCause
- Specified by:
getCausein interfaceAuthentication
-