net.sourceforge.spnego
Class SpnegoAuthScheme

java.lang.Object
  extended by net.sourceforge.spnego.SpnegoAuthScheme

final class SpnegoAuthScheme
extends Object

Example schemes are "Negotiate" and "Basic".

See examples and tutorials at http://spnego.sourceforge.net

Author:
Darwin V. Felix

Field Summary
private  boolean basicScheme
          true if Basic Auth scheme.
private static byte[] EMPTY_BYTE_ARRAY
          Zero length byte array.
private  boolean negotiateScheme
          true if Negotiate scheme.
private  boolean ntlm
          true if NTLM token.
private  String scheme
          HTTP (Request) "Authorization" Header scheme.
private  String token
          HTTP (Request) scheme token.
 
Constructor Summary
SpnegoAuthScheme(String authScheme, String authToken)
           
 
Method Summary
 String getScheme()
          Returns HTTP Authorization scheme.
 byte[] getToken()
          Returns a copy of byte[].
(package private)  boolean isBasicScheme()
          Returns true if this SpnegoAuthScheme is of type "Basic".
(package private)  boolean isNegotiateScheme()
          Returns true if this SpnegoAuthScheme is of type "Negotiate".
(package private)  boolean isNtlmToken()
          Returns true if NTLM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_BYTE_ARRAY

private static final transient byte[] EMPTY_BYTE_ARRAY
Zero length byte array.


scheme

private final transient String scheme
HTTP (Request) "Authorization" Header scheme.


token

private final transient String token
HTTP (Request) scheme token.


basicScheme

private final transient boolean basicScheme
true if Basic Auth scheme.


negotiateScheme

private final transient boolean negotiateScheme
true if Negotiate scheme.


ntlm

private final transient boolean ntlm
true if NTLM token.

Constructor Detail

SpnegoAuthScheme

public SpnegoAuthScheme(String authScheme,
                        String authToken)
Parameters:
authScheme -
authToken -
Method Detail

isBasicScheme

boolean isBasicScheme()
Returns true if this SpnegoAuthScheme is of type "Basic".

Returns:
true if Basic Auth scheme

isNegotiateScheme

boolean isNegotiateScheme()
Returns true if this SpnegoAuthScheme is of type "Negotiate".

Returns:
true if Negotiate scheme

isNtlmToken

boolean isNtlmToken()
Returns true if NTLM.

Returns:
true if Servlet Filter received NTLM token

getScheme

public String getScheme()
Returns HTTP Authorization scheme.

Returns:
"Negotiate" or "Basic"

getToken

public byte[] getToken()
Returns a copy of byte[].

Returns:
copy of token