@Transient
public class OAuth2ClientAuthenticationToken
extends org.springframework.security.authentication.AbstractAuthenticationToken
| 构造器和说明 |
|---|
OAuth2ClientAuthenticationToken(org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient,
org.springframework.security.oauth2.core.ClientAuthenticationMethod clientAuthenticationMethod,
Object credentials)
Constructs an
OAuth2ClientAuthenticationToken using the provided parameters. |
OAuth2ClientAuthenticationToken(org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient,
org.springframework.security.oauth2.core.ClientAuthenticationMethod clientAuthenticationMethod,
Object credentials,
Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) |
OAuth2ClientAuthenticationToken(String clientId,
org.springframework.security.oauth2.core.ClientAuthenticationMethod clientAuthenticationMethod,
Object credentials,
Map<String,Object> additionalParameters)
Constructs an
OAuth2ClientAuthenticationToken using the provided parameters. |
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,Object> |
getAdditionalParameters()
Returns the additional parameters.
|
org.springframework.security.oauth2.core.ClientAuthenticationMethod |
getClientAuthenticationMethod()
Returns the
authentication method used by the client. |
Object |
getCredentials() |
Object |
getPrincipal() |
org.springframework.security.oauth2.server.authorization.client.RegisteredClient |
getRegisteredClient()
Returns the authenticated
registered client, or null if not authenticated. |
public OAuth2ClientAuthenticationToken(String clientId, org.springframework.security.oauth2.core.ClientAuthenticationMethod clientAuthenticationMethod, @Nullable Object credentials, @Nullable Map<String,Object> additionalParameters)
OAuth2ClientAuthenticationToken using the provided parameters.clientId - the client identifierclientAuthenticationMethod - the authentication method used by the clientcredentials - the client credentialsadditionalParameters - the additional parameterspublic OAuth2ClientAuthenticationToken(org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient,
org.springframework.security.oauth2.core.ClientAuthenticationMethod clientAuthenticationMethod,
@Nullable
Object credentials)
OAuth2ClientAuthenticationToken using the provided parameters.registeredClient - the authenticated registered clientclientAuthenticationMethod - the authentication method used by the clientcredentials - the client credentialspublic OAuth2ClientAuthenticationToken(org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient,
org.springframework.security.oauth2.core.ClientAuthenticationMethod clientAuthenticationMethod,
@Nullable
Object credentials,
Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
public Object getPrincipal()
@Nullable public Object getCredentials()
@Nullable public org.springframework.security.oauth2.server.authorization.client.RegisteredClient getRegisteredClient()
registered client, or null if not authenticated.RegisteredClient, or null if not authenticatedpublic org.springframework.security.oauth2.core.ClientAuthenticationMethod getClientAuthenticationMethod()
authentication method used by the client.ClientAuthenticationMethod used by the clientCopyright © 2022. All rights reserved.