public interface CustomCacheableAuthenticationInfo extends AuthenticationInfo
This object can be cached by the Neo4j authentication cache.
This is an alternative to CacheableAuthenticationInfo to use if you want to manage your own way of hashing and matching credentials. On authentication, when a cached authentication info from a previous successful authentication attempt is found for the principal within the auth token map, then doCredentialsMatch of the CredentialsMatcher returned by credentialsMatcher will be called to determine if the credentials match.
NOTE: Caching only occurs if it is explicitly enabled by the plugin.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
CustomCacheableAuthenticationInfo.CredentialsMatcher |
| Modifier and Type | Method and Description |
|---|---|
CustomCacheableAuthenticationInfo.CredentialsMatcher |
credentialsMatcher()
Returns the credentials matcher that will be used to verify the credentials of an auth token against the
cached credentials in this object.
|
static CustomCacheableAuthenticationInfo |
of(Object principal,
CustomCacheableAuthenticationInfo.CredentialsMatcher credentialsMatcher) |
of, principalCustomCacheableAuthenticationInfo.CredentialsMatcher credentialsMatcher()
NOTE: The returned object implementing the CredentialsMatcher interface need to have a reference to the actual credentials in a matcheable form within its context in order to benefit from caching, so it is typically stateful. The simplest way is to return a lambda from this method.
static CustomCacheableAuthenticationInfo of(Object principal, CustomCacheableAuthenticationInfo.CredentialsMatcher credentialsMatcher)
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.