Package waffle.shiro.negotiate
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 Summary
ConstructorDescriptionNegotiateToken
(byte[] newIn, byte[] newOut, String newConnectionId, String newSecurityPackage, boolean newNtlmPost, boolean newRememberMe, String newHost) Instantiates a new negotiate token. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.shiro.authc.AuthenticationInfo
Creates the info.Gets the connection id.getHost()
Returns the host name or IP string from where the authentication attempt occurs.byte[]
getIn()
Gets the in.Gets the security package.Gets the subject.boolean
Checks if is ntlm post.boolean
Returnstrue
if the submitting user wishes their identity (principal(s)) to be remembered across sessions,false
otherwise.void
setOut
(byte[] outToken) Sets the out.void
setPrincipal
(Principal value) Sets the principal.void
setSubject
(Subject value) Sets the subject.
-
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 innewOut
- the new outnewConnectionId
- the new connection idnewSecurityPackage
- the new security packagenewNtlmPost
- the new ntlm postnewRememberMe
- the new remember menewHost
- the new host
-
-
Method Details
-
getConnectionId
Gets the connection id.- Returns:
- the connection id
-
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
- Specified by:
getCredentials
in interfaceorg.apache.shiro.authc.AuthenticationToken
-
getPrincipal
- Specified by:
getPrincipal
in interfaceorg.apache.shiro.authc.AuthenticationToken
-
setOut
public void setOut(byte[] outToken) Sets the out.- Parameters:
outToken
- the new out
-
setSubject
Sets the subject.- Parameters:
value
- the new subject
-
getIn
public byte[] getIn()Gets the in.- Returns:
- the in
-
getSubject
Gets the subject.- Returns:
- the subject
-
createInfo
public org.apache.shiro.authc.AuthenticationInfo createInfo()Creates the info.- Returns:
- the authentication info
-
setPrincipal
Sets the principal.- Parameters:
value
- the new principal
-
isRememberMe
public boolean isRememberMe()Returnstrue
if the submitting user wishes their identity (principal(s)) to be remembered across sessions,false
otherwise. Unless overridden, this value isfalse
by default.- Specified by:
isRememberMe
in interfaceorg.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
Returns the host name or IP string from where the authentication attempt occurs. May benull
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 interfaceorg.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
-