Credentials (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.oncrpc.security, class: Credentials

Package org.apache.hadoop.oncrpc.security

# Class Credentials

java.lang.Object
org.apache.hadoop.oncrpc.security.RpcAuthInfo
org.apache.hadoop.oncrpc.security.Credentials

Direct Known Subclasses:
  `CredentialsGSS`, `CredentialsNone`, `CredentialsSys`

public abstract class Credentials extends RpcAuthInfo
Base class for all credentials. Currently we only support 3 different types of auth flavors: AUTH_NONE, AUTH_SYS, and RPCSEC_GSS.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.hadoop.oncrpc.security.RpcAuthInfo

  `RpcAuthInfo.AuthFlavor`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final org.slf4j.Logger`
  `LOG`
  `protected int`
  `mCredentialsLength`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `Credentials(RpcAuthInfo.AuthFlavor flavor)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Credentials`
  `readFlavorAndCredentials(XDR xdr)`
  `static void`
  `writeFlavorAndCredentials(Credentials cred, XDR xdr)`
  Write AuthFlavor and the credentials to the XDR

  ### Methods inherited from class org.apache.hadoop.oncrpc.security.RpcAuthInfo

  `getFlavor, read, toString, write`

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

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

- ## Field Details

  - ### LOG

    public static final org.slf4j.Logger LOG

  - ### mCredentialsLength

    protected int mCredentialsLength

- ## Constructor Details

  - ### Credentials

    protected Credentials(RpcAuthInfo.AuthFlavor flavor)

- ## Method Details

  - ### readFlavorAndCredentials

    public static Credentials readFlavorAndCredentials(XDR xdr)

  - ### writeFlavorAndCredentials

    public static void writeFlavorAndCredentials(Credentials cred, XDR xdr)
    Write AuthFlavor and the credentials to the XDR
    Parameters:
      `cred` - credentials
      `xdr` - XDR message