|
IBM Cloud SDK Core
1.3.0
The IBM.Cloud.SDK.Core is a core project of SDKs generated using the IBM OpenAPI SDK generator.
|
This class implements support for Bearer Token Authentication. The main purpose of this authenticator is to construct the Authorization header and then add it to each outgoing REST API request. More...
Public Member Functions | |
| BearerTokenAuthenticator (string bearerToken) | |
| Construct a BearerTokenAuthenticator instance with the specified access token. The token value will be used to construct an Authorization header that will be included in outgoing REST API requests. More... | |
| BearerTokenAuthenticator (Dictionary< string, string > config) | |
| Construct a BearerTokenAuthenticator using properties retrieved from the specified Map. More... | |
| override void | Authenticate (IClient client) |
| This method is called to authenticate an outgoing REST API request. Here, we'll just set the Authorization header to provide the necessary authentication info. More... | |
| override void | Validate () |
| Validates the current set of configuration information in the Authenticator. More... | |
Properties | |
| string | BearerToken [get, set] |
| The access token configured for this authenticator More... | |
| override string | AuthenticationType [get] |
Properties inherited from IBM.Cloud.SDK.Core.Authentication.Authenticator | |
| virtual string | AuthenticationType [get] |
| Returns the authentication type associated with the Authenticator instance. More... | |
Properties inherited from IBM.Cloud.SDK.Core.Authentication.IAuthenticator | |
| string | AuthenticationType [get] |
| Returns the authentication type associated with the AuthenticatorConfig instance. More... | |
Additional Inherited Members | |
Public Attributes inherited from IBM.Cloud.SDK.Core.Authentication.Authenticator | |
| const string | AuthTypeBasic = "basic" |
| These are the valid authentication types. More... | |
| const string | AuthTypeNoAuth = "noAuth" |
| const string | AuthTypeIam = "iam" |
| const string | AuthTypeCp4d = "cp4d" |
| const string | AuthTypeBearer = "bearerToken" |
Static Public Attributes inherited from IBM.Cloud.SDK.Core.Authentication.Authenticator | |
| static string | PropNameAuthType = "AUTH_TYPE" |
| Constants which define the names of external config propreties (credential file, environment variable, etc.). More... | |
| static string | PropNameUsername = "USERNAME" |
| static string | PropNamePassword = "PASSWORD" |
| static string | PropNameBearerToken = "BEARER_TOKEN" |
| static string | PropNameUrl = "AUTH_URL" |
| static string | PropNameDisableSslVerification = "AUTH_DISABLE_SSL" |
| static string | PropNameApikey = "APIKEY" |
| static string | PropNameClientId = "CLIENT_ID" |
| static string | PropNameClientSecret = "CLIENT_SECRET" |
| static string | ErrorMessagePropMissing = "The {0} property is required but was not specified." |
| static string | ErrorMessagePropInvalid = "The {0} property is invalid. Please remove any surrounding {{, }}, or \" characters." |
| static string | ErrorMessageReqFailed = "Error while fetching access token from token service: " |
This class implements support for Bearer Token Authentication. The main purpose of this authenticator is to construct the Authorization header and then add it to each outgoing REST API request.
|
inline |
Construct a BearerTokenAuthenticator instance with the specified access token. The token value will be used to construct an Authorization header that will be included in outgoing REST API requests.
| bearerToken | The access token value |
|
inline |
Construct a BearerTokenAuthenticator using properties retrieved from the specified Map.
| config | Config a map containing the access token value |
|
inlinevirtual |
This method is called to authenticate an outgoing REST API request. Here, we'll just set the Authorization header to provide the necessary authentication info.
| client |
Reimplemented from IBM.Cloud.SDK.Core.Authentication.Authenticator.
|
inlinevirtual |
Validates the current set of configuration information in the Authenticator.
Reimplemented from IBM.Cloud.SDK.Core.Authentication.Authenticator.
|
get |
|
getset |
The access token configured for this authenticator