public class OpenIdAuthenticationToken
extends org.springframework.security.authentication.AbstractAuthenticationToken
| 构造器和说明 |
|---|
OpenIdAuthenticationToken(Object principal,
Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
This constructor should only be used by
AuthenticationManager or
AuthenticationProvider implementations that are satisfied with
producing a trusted (i.e. |
OpenIdAuthenticationToken(String openId,
String providerId)
This constructor can be safely used by any code that wishes to create a
UsernamePasswordAuthenticationToken, as the AbstractAuthenticationToken.isAuthenticated()
will return false. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
eraseCredentials() |
Object |
getCredentials() |
Object |
getPrincipal() |
String |
getProviderId() |
void |
setAuthenticated(boolean isAuthenticated) |
public OpenIdAuthenticationToken(String openId, String providerId)
UsernamePasswordAuthenticationToken, as the AbstractAuthenticationToken.isAuthenticated()
will return false.public OpenIdAuthenticationToken(Object principal, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
AuthenticationManager or
AuthenticationProvider implementations that are satisfied with
producing a trusted (i.e. AbstractAuthenticationToken.isAuthenticated() = true)
authentication token.principal - credentials - authorities - public Object getCredentials()
public Object getPrincipal()
public String getProviderId()
public void setAuthenticated(boolean isAuthenticated)
throws IllegalArgumentException
setAuthenticated 在接口中 org.springframework.security.core.AuthenticationsetAuthenticated 在类中 org.springframework.security.authentication.AbstractAuthenticationTokenIllegalArgumentExceptionpublic void eraseCredentials()
eraseCredentials 在接口中 org.springframework.security.core.CredentialsContainereraseCredentials 在类中 org.springframework.security.authentication.AbstractAuthenticationTokenCopyright © 2018. All rights reserved.