Class CortexAuthContext


  • @Singleton
    public class CortexAuthContext
    extends java.lang.Object
    Holds the token retrieved from env var or spark session properties and decodes the user information
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ANONYMOUS
      Default user
      static java.lang.String CORTEX_TOKEN
      Token env var location
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getToken()
      The set token
      java.lang.String getUser()
      The user, decoded from the token or anonymous if token not found
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CORTEX_TOKEN

        public static final java.lang.String CORTEX_TOKEN
        Token env var location
        See Also:
        Constant Field Values
    • Constructor Detail

      • CortexAuthContext

        public CortexAuthContext()
        Default auth context constructor, retrieves token from CORTEX_TOKEN
      • CortexAuthContext

        public CortexAuthContext​(java.lang.String token)
        Spark session property based token constructor, set in CortexSession.CortexSessionModule
        Parameters:
        token -
    • Method Detail

      • getToken

        public java.lang.String getToken()
        The set token
        Returns:
      • getUser

        public java.lang.String getUser()
        The user, decoded from the token or anonymous if token not found
        Returns: