Class AppAuthentication

java.lang.Object
com.erudika.para.server.security.AppAuthentication
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication

public class AppAuthentication extends Object implements org.springframework.security.core.Authentication
A simple wrapper for the authentication object.
Author:
Alex Bogdanovski [[email protected]]
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication

    org.springframework.security.core.Authentication.Builder<B extends org.springframework.security.core.Authentication.Builder<B>>
  • Constructor Summary

    Constructors
    Constructor
    Description
    AppAuthentication(com.erudika.para.core.App principal)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Collection<? extends org.springframework.security.core.GrantedAuthority>
    A list of roles for the authenticated application.
    Always null (unused).
    The application object.
    The application identifier.
    The application object.
    boolean
    Checks if the application is authenticated.
    void
    setAuthenticated(boolean isAuthenticated)
    Not supported.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.security.core.Authentication

    toBuilder

    Methods inherited from interface java.security.Principal

    equals, hashCode, implies, toString
  • Constructor Details

    • AppAuthentication

      public AppAuthentication(com.erudika.para.core.App principal)
      Default constructor.
      Parameters:
      principal - the application object
  • Method Details

    • getAuthorities

      public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
      A list of roles for the authenticated application.
      Specified by:
      getAuthorities in interface org.springframework.security.core.Authentication
      Returns:
      a list of roles
    • getCredentials

      public Object getCredentials()
      Always null (unused).
      Specified by:
      getCredentials in interface org.springframework.security.core.Authentication
      Returns:
      credentials string
    • getDetails

      public Object getDetails()
      The application object.
      Specified by:
      getDetails in interface org.springframework.security.core.Authentication
      Returns:
      the application
    • getPrincipal

      public Object getPrincipal()
      The application object.
      Specified by:
      getPrincipal in interface org.springframework.security.core.Authentication
      Returns:
      the application
    • isAuthenticated

      public boolean isAuthenticated()
      Checks if the application is authenticated.
      Specified by:
      isAuthenticated in interface org.springframework.security.core.Authentication
      Returns:
      true if authenticated
    • setAuthenticated

      public void setAuthenticated(boolean isAuthenticated)
      Not supported.
      Specified by:
      setAuthenticated in interface org.springframework.security.core.Authentication
      Parameters:
      isAuthenticated - true if authenticated
    • getName

      public String getName()
      The application identifier.
      Specified by:
      getName in interface Principal
      Returns:
      the identifier