Class TelegramAnonymousAuthentication
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.authentication.AnonymousAuthenticationToken
io.github.yvasyliev.forwarder.telegram.bot.security.authentication.TelegramAnonymousAuthentication
- All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer
public final class TelegramAnonymousAuthentication
extends org.springframework.security.authentication.AnonymousAuthenticationToken
Represents an anonymous authentication token for a Telegram user.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication
org.springframework.security.core.Authentication.Builder<B> -
Method Summary
Modifier and TypeMethodDescriptioncreate(org.telegram.telegrambots.meta.api.objects.User user) Creates a newTelegramAnonymousAuthenticationfor the given Telegram user.Methods inherited from class org.springframework.security.authentication.AnonymousAuthenticationToken
equals, getCredentials, getKeyHash, getPrincipal, hashCodeMethods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
eraseCredentials, getAuthorities, getDetails, getName, isAuthenticated, setAuthenticated, setDetails, toStringMethods inherited from interface org.springframework.security.core.Authentication
toBuilder
-
Method Details
-
create
public static TelegramAnonymousAuthentication create(org.telegram.telegrambots.meta.api.objects.User user) Creates a newTelegramAnonymousAuthenticationfor the given Telegram user.- Parameters:
user- the Telegram user- Returns:
- the anonymous authentication token
-