public static final class AuthenticationToken.AuthenticationTokenSerializer extends Object
AuthenticationToken
objects.Constructor and Description |
---|
AuthenticationTokenSerializer() |
Modifier and Type | Method and Description |
---|---|
static <T extends AuthenticationToken> |
deserialize(Class<T> tokenType,
byte[] tokenBytes)
A convenience method to create tokens from serialized bytes, created by
serialize(AuthenticationToken) |
static AuthenticationToken |
deserialize(String tokenClassName,
byte[] tokenBytes)
An alternate version of
deserialize(Class, byte[]) that accepts a token class name
rather than a token class. |
static byte[] |
serialize(AuthenticationToken token)
A convenience method to serialize tokens.
|
public static <T extends AuthenticationToken> T deserialize(Class<T> tokenType, byte[] tokenBytes)
serialize(AuthenticationToken)
The specified tokenType will be instantiated, and used to deserialize the decoded bytes. The resulting object will then be returned to the caller.
tokenType
- the token class to use to deserialize the bytestokenBytes
- the token-specific serialized bytesAuthenticationToken
instance of the type specified by tokenTypeserialize(AuthenticationToken)
public static AuthenticationToken deserialize(String tokenClassName, byte[] tokenBytes)
deserialize(Class, byte[])
that accepts a token class name
rather than a token class.tokenClassName
- the fully-qualified class name to be returnedserialize(AuthenticationToken)
public static byte[] serialize(AuthenticationToken token)
The provided AuthenticationToken
will be serialized to bytes by its own
implementation and returned to the caller.
token
- the token to serializeAuthenticationToken
deserialize(Class, byte[])
Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.