-
Notifications
You must be signed in to change notification settings - Fork 4
TokenInitializer
A TokenInitializer can be used to add a token to the request headers in the Authorization field.
Use the following method to create a default TokenInitializer:
| Method name | Parameters | Returns | Description |
|---|---|---|---|
|
File |
TokenInitializer |
Uses the token in the specified file. |
For DC/OS special TokenInitializers exist. To get more info about the different types of tokens DC/OS uses, click here.
WARNING: The lifetime of the DC/OS tokens is limited. So far there is no possibility to automatically refresh them. Remember to do this manually!
Use the following methods to create special DC/OS TokenInitializers:
| Method name | Parameter | Returns | Description |
|---|---|---|---|
|
File |
TokenInitializer |
Reads the OpenId Connect Id token from the specified file, uses it to retrieve a DC/OS authentication token and uses that for authentication. To retrieve your OpenId Connect Id token open |
|
void |
TokenInitializer |
Reads the DC/OS authentication token from the DC/OS CLI config ( |
