org.apache.ignite.plugin.security

## Class AuthenticationContext

- java.lang.Object
- - org.apache.ignite.plugin.security.AuthenticationContext

-     public class AuthenticationContext
      extends Object

  Authentication context.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuthenticationContext()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `InetSocketAddress` | `address()` Gets subject network address.
    `void` | `address(InetSocketAddress addr)` Sets subject network address.
    `Certificate[]` | `certificates()`
    `AuthenticationContext` | `certificates(Certificate[] certs)` Set client SSL certificates.
    `SecurityCredentials` | `credentials()` Gets security credentials.
    `void` | `credentials(SecurityCredentials creds)` Sets security credentials.
    `boolean` | `isClient()`
    `Map<String,Object>` | `nodeAttributes()` Gets node attributes.
    `void` | `nodeAttributes(Map<String,?> nodeAttrs)` Sets node attributes.
    `AuthenticationContext` | `setClient(boolean newVal)` Sets flag indicating if this is client node context.
    `UUID` | `subjectId()` Gets subject ID.
    `void` | `subjectId(UUID subjId)` Sets subject ID.
    `SecuritySubjectType` | `subjectType()` Gets subject type.
    `void` | `subjectType(SecuritySubjectType subjType)` Sets subject type.

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

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

- - ### Constructor Detail

    - #### AuthenticationContext

          public AuthenticationContext()

  - ### Method Detail

    - #### subjectType

          public SecuritySubjectType subjectType()

      Gets subject type.
      Returns:
        Subject type.

    - #### subjectType

          public void subjectType(SecuritySubjectType subjType)

      Sets subject type.
      Parameters:
        `subjType` - Subject type.

    - #### subjectId

          public UUID subjectId()

      Gets subject ID.
      Returns:
        Subject ID.

    - #### subjectId

          public void subjectId(UUID subjId)

      Sets subject ID.
      Parameters:
        `subjId` - Subject ID.

    - #### credentials

          public SecurityCredentials credentials()

      Gets security credentials.
      Returns:
        Security credentials.

    - #### credentials

          public void credentials(SecurityCredentials creds)

      Sets security credentials.
      Parameters:
        `creds` - Security credentials.

    - #### address

          public InetSocketAddress address()

      Gets subject network address.
      Returns:
        Subject network address.

    - #### address

          public void address(InetSocketAddress addr)

      Sets subject network address.
      Parameters:
        `addr` - Subject network address.

    - #### nodeAttributes

          public Map<String,Object> nodeAttributes()

      Gets node attributes.
      Returns:
        Node attributes or empty map for `SecuritySubjectType.REMOTE_CLIENT`.

    - #### nodeAttributes

          public void nodeAttributes(Map<String,?> nodeAttrs)

      Sets node attributes.
      Parameters:
        `nodeAttrs` - Node attributes.

    - #### certificates

          public Certificate[] certificates()

      Returns:
        Client SSL certificates.

    - #### certificates

          public AuthenticationContext certificates(Certificate[] certs)

      Set client SSL certificates.
      Parameters:
        `certs` - Client SSL certificates.
      Returns:
        `this` for chaining.

    - #### isClient

          public boolean isClient()

      Returns:
        `true` if this is a client node context.

    - #### setClient

          public AuthenticationContext setClient(boolean newVal)

      Sets flag indicating if this is client node context.
      Parameters:
        `newVal` - Whether current authentication context relates to client node connection.
      Returns:
        `this` for chaining.

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023