Class ApiKeyToken
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
edu.ucsb.cs156.frontiers.config.ApiKeyToken
- All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer
public class ApiKeyToken
extends org.springframework.security.authentication.AbstractAuthenticationToken
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionApiKeyToken(CourseApiKey key, User user, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) Creates a token with the supplied array of authorities. -
Method Summary
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, hashCode, setAuthenticated, setDetails, toString
-
Constructor Details
-
ApiKeyToken
public ApiKeyToken(CourseApiKey key, User user, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) Creates a token with the supplied array of authorities.- Parameters:
authorities- the collection of GrantedAuthoritys for the principal represented by this authentication object.
-
-
Method Details
-
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticatedin interfaceorg.springframework.security.core.Authentication- Overrides:
isAuthenticatedin classorg.springframework.security.authentication.AbstractAuthenticationToken
-
getCredentials
-
getPrincipal
-
getName
-