ExtendedGSSCredential (Java SE 12 & JDK 12 )
Keywords: com.sun.security.jgss.ExtendedGSSCredential interface

Module jdk.security.jgss
Package com.sun.security.jgss

## Interface ExtendedGSSCredential

- All Superinterfaces:
    `Cloneable`, `GSSCredential`

      public interface ExtendedGSSCredential
      extends GSSCredential

  The extended GSSCredential interface for supporting additional functionalities not defined by `org.ietf.jgss.GSSCredential`.
  Since:
    1.8

- - ### Field Summary

    - ### Fields declared in interface org.ietf.jgss.GSSCredential

      `ACCEPT_ONLY, DEFAULT_LIFETIME, INDEFINITE_LIFETIME, INITIATE_AND_ACCEPT, INITIATE_ONLY`

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `GSSCredential` | `impersonate​(GSSName name)` | Impersonates a principal.

    - ### Methods declared in interface org.ietf.jgss.GSSCredential

      `add, dispose, equals, getMechs, getName, getName, getRemainingAcceptLifetime, getRemainingInitLifetime, getRemainingLifetime, getUsage, getUsage, hashCode`

- - ### Method Detail

    - #### impersonate

          GSSCredential impersonate​(GSSName name)
                             throws GSSException

      Impersonates a principal. In Kerberos, this can be implemented using the Microsoft S4U2self extension.

      A `GSSException.NO_CRED` will be thrown if the impersonation fails. A `GSSException.FAILURE` will be thrown if the impersonation method is not available to this credential object.

      Parameters:
        `name` - the name of the principal to impersonate
      Returns:
        a credential for that principal
      Throws:
        `GSSException` - containing the following major error codes: `GSSException.NO_CRED` `GSSException.FAILURE`