Packagecom.kaazing.gateway.client.security
Classpublic class NegotiateChallengeHandler
InheritanceNegotiateChallengeHandler Inheritance ChallengeHandler

A Negotiate Challenge Handler handles initial empty "Negotiate" challenges from the server. It uses other "candidate" challenger handlers to assemble an initial context token to send to the server, and is responsible for creating a challenge response that can delegate to the winning candidate.

This NegotiateChallengeHandler can be loaded and instantiated using ChallengeHandlers.load() , and registered at a location using DispatchChallengeHandler.register().

In addition, one can register more specific NegotiableChallengeHandler objects with this initial NegotiateChallengeHandler to handle initial Negotiate challenges and subsequent challenges associated with specific Negotiation mechanism types / object identifiers.

The following example establishes a Negotiation strategy at a specific URL location. We show the use of a DispatchChallengeHandler to register a NegotiateChallengeHandler at a specific location. The NegotiateChallengeHandler has a NegotiableChallengeHandler instance registered as one of the potential negotiable alternative challenge handlers.

 var someServerLoginHandler:LoginHandler  = ...
  ChallengeHandlers.setDefault((ChallengeHandlers.load(DispatchChallengeHandler.class) as DispatchChallengeHandler)
         .register("ws://some.server.com",
             (ChallengeHandlers.load(NegotiateChallengeHandler.class) as NegotiateChallengeHandler)
             .register((ChallengeHandlers.load(NegotiableChallengeHandler.class) as NegotiableChallengeHandler)
                     .setLoginHandler(someServerLoginHandler)
             )
             // could register more alternatives to negotiate amongst here.
         )
 );
 

See also

ChallengeHandlers.load()
DispatchChallengeHandler.register()
NegotiableChallengeHandler
RFC 4559 - Microsoft SPNEGO
RFC 4178 - GSS-API SPNEGO
RFC 2743 - GSS-API
RFC 4121 - Kerberos v5 GSS-API (version 2)
RFC 2616 - HTTP 1.1
RFC 2617 - HTTP Authentication


Public Methods
 MethodDefined by
 Inherited
canHandle(challengeRequest:ChallengeRequest):Boolean
Can the presented challenge be potentially handled by this challenge handler?
ChallengeHandler
  
[static] Called to automatically discover the default implementation when loading this challenge handler.
NegotiateChallengeHandler
 Inherited
handle(challengeRequest:ChallengeRequest, callback:Function):ChallengeResponseFuture
Handle the presented challenge by creating a challenge response future.
ChallengeHandler
  
initialize():Class
[static] Call this to initialize this class before loading implementations.
NegotiateChallengeHandler
  
Register a candidate negotiable challenge handler that will be used to respond to an initial "Negotiate" server challenge and can then potentially be a winning candidate in the race to handle the subsequent server challenge.
NegotiateChallengeHandler
Method detail
defaultImplementation()method
public static function defaultImplementation():String

Called to automatically discover the default implementation when loading this challenge handler.

Returns
String
initialize()method 
public static function initialize():Class

Call this to initialize this class before loading implementations.

Returns
Class
register()method 
public function register(handler:NegotiableChallengeHandler):NegotiateChallengeHandler

Register a candidate negotiable challenge handler that will be used to respond to an initial "Negotiate" server challenge and can then potentially be a winning candidate in the race to handle the subsequent server challenge.

Parameters
handler:NegotiableChallengeHandler — the mechanism-type-specific challenge handler.

Returns
NegotiateChallengeHandler — a reference to this handler, to support chained calls