Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public final class ApiKeyAuthenticationToken
- Object
- AbstractAuthenticationToken
- ApiKeyAuthenticationToken
ImplementsAuthentication
Who a request is from, when an API key says so. The principal is the
ApiKey, the name is the key’s owner, and each of the key’s scopes is the
authority SCOPE_x – the same authorities a token with those scopes gets,
so one set of rules covers both.Constructors
public ApiKeyAuthenticationToken(ApiKey apiKey) |
Methods
public ApiKey getApiKey() | |
public Object getPrincipal() | The identity: a username before authentication, and afterwards usually the UserDetails it was resolved to. |
public Object getCredentials() | Null: the key itself is not kept once it has been recognized. |
public String getName() | The principal’s name. |
Inherited methods
Constructor details
ApiKeyAuthenticationToken
public ApiKeyAuthenticationToken(ApiKey apiKey)Method details
getApiKey
public ApiKey getApiKey()getPrincipal
public Object getPrincipal()The identity: a username before authentication, and afterwards usually the
UserDetails it was
resolved to.getCredentials
public Object getCredentials()Null: the key itself is not kept once it has been recognized.
getName
public String getName()The principal’s name.