Java Code Examples for sun.net.www.protocol.http.spnego.NegotiateCallbackHandler

Following code examples demonstrate how to use sun.net.www.protocol.http.spnego.NegotiateCallbackHandlerfrom java. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use sun.net.www.protocol.http.spnego.NegotiateCallbackHandlerand various code implementation of this class.

  
  public static Subject login(GSSCaller paramGSSCaller, Oid paramOid)
    throws LoginException
  {
    Object localObject1 = null;
    if ((paramGSSCaller instanceof HttpCaller))
    {
      localObject1 = new NegotiateCallbackHandler(((HttpCaller)paramGSSCaller).info());
    }
    else
    {
      localObject2 = Security.getProperty("auth.login.defaultCallbackHandler");
      if ((localObject2 != null) && (((String)localObject2).length() != 0)) {
        localObject1 = null;
      } else {
        localObject1 = new TextCallbackHandler();
      }
    }
    Object localObject2 = new LoginContext("", null, (CallbackHandler)localObject1, new LoginConfigImpl(paramGSSCaller, paramOid));
    ((LoginContext)localObject2).login();
    return ((LoginContext)localObject2).getSubject();
  } 


Advertisement
Javadoc
@since 1.6 Special callback handler used in JGSS for the HttpCaller.
Advertisement