Class AnonymousAuthenticationToken

java.lang.Object
com.codename1.backend.security.AbstractAuthenticationToken
com.codename1.backend.security.AnonymousAuthenticationToken
All Implemented Interfaces:
Authentication

public class AnonymousAuthenticationToken extends AbstractAuthenticationToken
Who a request is from when nobody signed in: a principal called anonymousUser holding ROLE_ANONYMOUS, so authorization rules always have someone to ask about. authenticated() does not accept it.
  • Constructor Details

    • AnonymousAuthenticationToken

      public AnonymousAuthenticationToken(String key, Object principal, Collection<? extends GrantedAuthority> authorities)
      Parameters:
      key - what identifies the filter that made the token
  • Method Details

    • getKeyHash

      public int getKeyHash()
      The hash of the key the token was made with.
    • getCredentials

      public Object getCredentials()
      Description copied from interface: Authentication
      What proves the principal is who it says: a password, usually, and null once it has been checked.
    • getPrincipal

      public Object getPrincipal()
      Description copied from interface: Authentication
      The identity: a username before authentication, and afterwards usually the UserDetails it was resolved to.