public class WorkerTokenClientCallbackHandler extends SimpleSaslClientCallbackHandler
A Client callback handler for a WorkerToken. In general a client that wants to support worker tokens should first check if a WorkerToken is available for the specific connection type by calling findWorkerTokenInSubject. If that returns a token, then proceed to create and use this with a DIGEST-MD5 SaslClient. If not you should fall back to whatever other client auth you want to do.
Constructor and Description |
---|
WorkerTokenClientCallbackHandler(WorkerToken token)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static WorkerToken |
findWorkerTokenInSubject(ThriftConnectionType type)
Look in the current subject for a WorkerToken.
|
handle
public WorkerTokenClientCallbackHandler(WorkerToken token)
Constructor.
token
- the token to use to authenticate. This was probably retrieved by calling findWorkerTokenInSubject.public static WorkerToken findWorkerTokenInSubject(ThriftConnectionType type)
Look in the current subject for a WorkerToken. This should really only happen when we are in a worker, because the tokens will not be placed in anything else.
type
- the type of connection we need a token for.Copyright © 2022 The Apache Software Foundation. All rights reserved.