public interface CacheableAuthenticationInfo extends AuthenticationInfo
This object can be cached by the Neo4j authentication cache.
This is an alternative to CustomCacheableAuthenticationInfo if you want Neo4j to manage secure hashing and matching of cached credentials.
NOTE: Caching only occurs if it is explicitly enabled by the plugin.
| Modifier and Type | Method and Description |
|---|---|
byte[] |
credentials()
Should return credentials that can be cached, so that successive authentication attempts could be performed
against the cached authentication info from a previous successful authentication attempt, without having to
call AuthenticationInfo.getAuthenticationInfo() again.
|
static CacheableAuthenticationInfo |
of(Object principal,
byte[] credentials)
Creates a new CacheableAuthenticationInfo
|
Object |
principal()
Should return a principal that uniquely identifies the authenticated subject within this authentication provider.
|
ofObject principal()
Typically this is the same as the principal within the auth token map.
principal in interface AuthenticationInfoAuthToken.principal()byte[] credentials()
NOTE: The returned credentials will be hashed using a cryptographic hash function together with a random salt (generated with a secure random number generator) before being stored.
AuthToken.credentials(),
AuthenticationPlugin.authenticate(AuthToken)static CacheableAuthenticationInfo of(Object principal, byte[] credentials)
principal - a principal that uniquely identifies the authenticated subject within this authentication
providercredentials - credentials that can be cachedCopyright © 2002–2018 The Neo4j Graph Database Project. All rights reserved.