org.apache.hc.client5.http.impl.auth

## Class KerberosScheme

- java.lang.Object
- - org.apache.hc.client5.http.impl.auth.GGSSchemeBase
  - - org.apache.hc.client5.http.impl.auth.KerberosScheme

- All Implemented Interfaces:
    AuthScheme

      @Experimental
      public class KerberosScheme
      extends GGSSchemeBase

  Kerberos authentication scheme.

  Please note this class is considered experimental and may be discontinued or removed in the future.

  Since:
    4.2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `KerberosScheme()`
    `KerberosScheme(KerberosConfig config, DnsResolver dnsResolver)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected byte[]` | `generateToken(byte[] input, String serviceName, String authServer)`
    `String` | `getName()` Returns textual designation of the given authentication scheme.
    `boolean` | `isConnectionBased()` Determines if the authentication scheme is expected to provide an authorization response on a per connection basis instead of the standard per request basis

    - ### Methods inherited from class org.apache.hc.client5.http.impl.auth.GGSSchemeBase

      `createGSSContext, generateAuthResponse, generateGSSToken, getManager, getPrincipal, getRealm, isChallengeComplete, isResponseReady, processChallenge, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### KerberosScheme

          public KerberosScheme(KerberosConfig config,
                        DnsResolver dnsResolver)

      Since:
        5.0

    - #### KerberosScheme

          public KerberosScheme()

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from interface: `AuthScheme`
      Returns textual designation of the given authentication scheme.
      Returns:
        the name of the given authentication scheme

    - #### generateToken

          protected byte[] generateToken(byte[] input,
                             String serviceName,
                             String authServer)
                                  throws GSSException

      Specified by:
        `generateToken` in class `GGSSchemeBase`
      Throws:
        `GSSException`

    - #### isConnectionBased

          public boolean isConnectionBased()

      Description copied from interface: `AuthScheme`
      Determines if the authentication scheme is expected to provide an authorization response on a per connection basis instead of the standard per request basis
      Returns:
        `true` if the scheme is connection based, `false` if the scheme is request based.

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.