Class ApiKeyAuthenticationToken
java.lang.Object
com.codename1.backend.security.AbstractAuthenticationToken
com.codename1.backend.security.apikey.ApiKeyAuthenticationToken
- All Implemented Interfaces:
Authentication
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.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionNull: the key itself is not kept once it has been recognized.getName()The principal's name.The identity: a username before authentication, and afterwards usually theUserDetailsit was resolved to.Methods inherited from class AbstractAuthenticationToken
eraseCredentials, getAuthorities, getDetails, isAuthenticated, setAuthenticated, setDetails, toString
-
Constructor Details
-
ApiKeyAuthenticationToken
-
-
Method Details
-
getApiKey
-
getPrincipal
Description copied from interface:AuthenticationThe identity: a username before authentication, and afterwards usually theUserDetailsit was resolved to. -
getCredentials
Null: the key itself is not kept once it has been recognized. -
getName
Description copied from interface:AuthenticationThe principal's name.- Specified by:
getNamein interfaceAuthentication- Overrides:
getNamein classAbstractAuthenticationToken
-