public class X509CertificateAuthentication extends AbstractAuthenticationToken
X509Certificate.| Constructor and Description |
|---|
X509CertificateAuthentication(Object principal,
X509Certificate certificate,
Collection<? extends GrantedAuthority> authorities)
Creates a new X509CertificateAuthentication that was authenticated using the given certificate.
|
X509CertificateAuthentication(X509Certificate certificate)
Creates a new X509CertificateAuthentication that will use the given certificate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
eraseCredentials() |
X509Certificate |
getCredentials() |
Object |
getPrincipal() |
void |
setAuthenticated(boolean authenticated) |
equals, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setDetails, toStringpublic X509CertificateAuthentication(X509Certificate certificate)
Authentication, because the AbstractAuthenticationToken.isAuthenticated() will return
false.certificate - The certificate to create the authentication from.public X509CertificateAuthentication(Object principal, X509Certificate certificate, Collection<? extends GrantedAuthority> authorities)
AuthenticationManagers or AuthenticationProviders. The resulting
authentication is trusted (AbstractAuthenticationToken.isAuthenticated() returns true) and has the given authorities.principal - The authenticated principal.certificate - The certificate that was used to authenticate the principal.authorities - The authorities of the principal.public Object getPrincipal()
public X509Certificate getCredentials()
public void eraseCredentials()
eraseCredentials in interface CredentialsContainereraseCredentials in class AbstractAuthenticationTokenpublic void setAuthenticated(boolean authenticated)
setAuthenticated in interface AuthenticationsetAuthenticated in class AbstractAuthenticationToken