public class TokenClient extends Object implements ClientCredentialsExchanger
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_CONNECT_TIMEOUT_IN_SECONDS |
protected static int |
DEFAULT_READ_TIMEOUT_IN_SECONDS |
| Constructor and Description |
|---|
TokenClient(URL tokenUrl) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
TokenResult |
exchangeClientCredentials(ClientCredentialsExchangeRequest req)
Performs a token exchange using client credentials.
|
protected static final int DEFAULT_CONNECT_TIMEOUT_IN_SECONDS
protected static final int DEFAULT_READ_TIMEOUT_IN_SECONDS
public TokenClient(URL tokenUrl)
public void close()
throws Exception
close in interface AutoCloseableExceptionpublic TokenResult exchangeClientCredentials(ClientCredentialsExchangeRequest req) throws TokenExchangeException, IOException
exchangeClientCredentials in interface ClientCredentialsExchangerreq - the client credentials request details.TokenExchangeExceptionIOException - if a general IO error occurred.Copyright © 2017–2021 Apache Software Foundation. All rights reserved.