Class NegotiateToken

java.lang.Object
waffle.shiro.negotiate.NegotiateToken
All Implemented Interfaces:
Serializable, org.apache.shiro.authc.AuthenticationToken, org.apache.shiro.authc.HostAuthenticationToken, org.apache.shiro.authc.RememberMeAuthenticationToken

public class NegotiateToken extends Object implements org.apache.shiro.authc.HostAuthenticationToken, org.apache.shiro.authc.RememberMeAuthenticationToken
An authentication token wrapping a Waffle Negotiate token.
Since:
1.0.0
Author:
Dan Rollo
See Also:
  • Constructor Details

    • NegotiateToken

      public NegotiateToken(byte[] newIn, byte[] newOut, String newConnectionId, String newSecurityPackage, boolean newNtlmPost, boolean newRememberMe, String newHost)
      Instantiates a new negotiate token.
      Parameters:
      newIn - the new in
      newOut - the new out
      newConnectionId - the new connection id
      newSecurityPackage - the new security package
      newNtlmPost - the new ntlm post
      newRememberMe - the new remember me
      newHost - the new host
  • Method Details

    • getConnectionId

      public String getConnectionId()
      Gets the connection id.
      Returns:
      the connection id
    • getSecurityPackage

      public String getSecurityPackage()
      Gets the security package.
      Returns:
      the security package
    • isNtlmPost

      public boolean isNtlmPost()
      Checks if is ntlm post.
      Returns:
      true, if is ntlm post
    • getCredentials

      public Object getCredentials()
      Specified by:
      getCredentials in interface org.apache.shiro.authc.AuthenticationToken
    • getPrincipal

      public Principal getPrincipal()
      Specified by:
      getPrincipal in interface org.apache.shiro.authc.AuthenticationToken
    • setOut

      public void setOut(byte[] outToken)
      Sets the out.
      Parameters:
      outToken - the new out
    • setSubject

      public void setSubject(Subject value)
      Sets the subject.
      Parameters:
      value - the new subject
    • getIn

      public byte[] getIn()
      Gets the in.
      Returns:
      the in
    • getSubject

      public Subject getSubject()
      Gets the subject.
      Returns:
      the subject
    • createInfo

      public org.apache.shiro.authc.AuthenticationInfo createInfo()
      Creates the info.
      Returns:
      the authentication info
    • setPrincipal

      public void setPrincipal(Principal value)
      Sets the principal.
      Parameters:
      value - the new principal
    • isRememberMe

      public boolean isRememberMe()
      Returns true if the submitting user wishes their identity (principal(s)) to be remembered across sessions, false otherwise. Unless overridden, this value is false by default.
      Specified by:
      isRememberMe in interface org.apache.shiro.authc.RememberMeAuthenticationToken
      Returns:
      true if the submitting user wishes their identity (principal(s)) to be remembered across sessions, false otherwise (false by default).
      Since:
      0.9
    • getHost

      public String getHost()
      Returns the host name or IP string from where the authentication attempt occurs. May be null if the host name/IP is unknown or explicitly omitted. It is up to the Authenticator implementation processing this token if an authentication attempt without a host is valid or not.

      (Shiro's default Authenticator allows null hosts to support localhost and proxy server environments).

      Specified by:
      getHost in interface org.apache.shiro.authc.HostAuthenticationToken
      Returns:
      the host from where the authentication attempt occurs, or null if it is unknown or explicitly omitted.
      Since:
      1.0