@InterfaceAudience.Public public final class ClientTokenUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
obtainAndCacheToken(Connection conn,
User user)
Obtain an authentication token for the given user and add it to the
user's credentials.
|
static CompletableFuture<org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier>> |
obtainToken(AsyncConnection conn)
Obtain and return an authentication token for the current user.
|
@InterfaceAudience.Private public static CompletableFuture<org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier>> obtainToken(AsyncConnection conn)
conn
- The async HBase cluster connectionCompletableFuture
.public static void obtainAndCacheToken(Connection conn, User user) throws IOException, InterruptedException
conn
- The HBase cluster connectionuser
- The user for whom to obtain the tokenIOException
- If making a remote call to the authentication service failsInterruptedException
- If executing as the given user is interruptedCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.