org.apache.ignite.internal.processors.authentication

## Class AuthorizationContext

- java.lang.Object
- - org.apache.ignite.internal.processors.authentication.AuthorizationContext

    public class AuthorizationContext
    extends Object

Ignite authentication context.

### Constructor Summary

Constructors
Constructor and Description
`AuthorizationContext(User user)` Creates authentication context.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `checkUserOperation(UserManagementOperation op)`
`static void` `clear()` Clear authentication context.
`static AuthorizationContext` `context()`
`static void` `context(AuthorizationContext actx)`
`String` `userName()`

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

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

### Constructor Detail

#### AuthorizationContext

    public AuthorizationContext(User user)

Creates authentication context.

Parameters:
  `user` - Authorized user.

### Method Detail

#### userName

    public String userName()

Returns:
  Authorized user.

#### checkUserOperation

    public void checkUserOperation(UserManagementOperation op)
                            throws IgniteAccessControlException

Parameters:
  `op` - User operation to check.
Throws:
  `IgniteAccessControlException` - If operation check fails: user hasn't permissions for user management or try to remove default user.

#### context

    public static void context(AuthorizationContext actx)

Parameters:
  `actx` - Authorization context to set.

#### clear

    public static void clear()

Clear authentication context.

#### context

    public static AuthorizationContext context()

Returns:
  Current authorization context.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.5
Release Date | : June 4 2019