Class PossibleTrustedHeaderToken

java.lang.Object
org.graylog2.shared.security.PossibleTrustedHeaderToken
All Implemented Interfaces:
Serializable, org.apache.shiro.authc.AuthenticationToken, org.apache.shiro.authc.HostAuthenticationToken, RemoteAddressAuthenticationToken

public class PossibleTrustedHeaderToken extends Object implements org.apache.shiro.authc.HostAuthenticationToken, RemoteAddressAuthenticationToken
See Also:
  • Constructor Details

    • PossibleTrustedHeaderToken

      public PossibleTrustedHeaderToken(String host, String remoteAddr)
  • Method Details

    • getPrincipal

      @Nullable public Object getPrincipal()
      A HttpHeadersToken does not have a natural principal associated with it, so this is always null.
      Specified by:
      getPrincipal in interface org.apache.shiro.authc.AuthenticationToken
      Returns:
      null
    • getCredentials

      @Nullable public Object getCredentials()
      A HttpHeadersToken does not have a natural credential associated with it, so this is always null.
      Specified by:
      getCredentials in interface org.apache.shiro.authc.AuthenticationToken
      Returns:
      null
    • getHost

      public String getHost()
      Specified by:
      getHost in interface org.apache.shiro.authc.HostAuthenticationToken
    • getRemoteAddr

      public String getRemoteAddr()
      The direct remote address, if the request came through a proxy, this will be the address of last hop. Typically used to verify that a client is "trusted".
      Specified by:
      getRemoteAddr in interface RemoteAddressAuthenticationToken
      Returns:
      the direct peer's address