public class X509AuthenticationToken extends AbstractAuthenticationToken
Authentication implementation for X.509 client-certificate authentication.| Constructor and Description |
|---|
X509AuthenticationToken(Object principal,
X509Certificate credentials,
GrantedAuthority[] authorities)
Used for an authentication response object.
|
X509AuthenticationToken(X509Certificate credentials)
Used for an authentication request.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getCredentials()
The credentials that prove the principal is correct.
|
Object |
getPrincipal()
The identity of the principal being authenticated.
|
equals, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringpublic X509AuthenticationToken(X509Certificate credentials)
Authentication.isAuthenticated() will return
false.credentials - the certificatepublic X509AuthenticationToken(Object principal, X509Certificate credentials, GrantedAuthority[] authorities)
Authentication#isAuthenticated()
will return true.principal - the principal, which is generally a
UserDetailscredentials - the certificateauthorities - the authoritiespublic Object getCredentials()
AuthenticationAuthenticationManager. Callers are expected to populate the credentials.Principalpublic Object getPrincipal()
AuthenticationPrincipal being authenticatedCopyright © 2016. All rights reserved.