IBM Cloud SDK Core  1.1.0
The IBM.Cloud.SDK.Core is a core project of SDKs generated using the IBM OpenAPI SDK generator.
IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator Class Reference

This class implements support for the IAM authentication mechanism. More...

Inheritance diagram for IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator:
IBM.Cloud.SDK.Core.Authentication.Authenticator IBM.Cloud.SDK.Core.Authentication.IAuthenticator

Public Member Functions

 IamAuthenticator (string apikey, string url=null, string clientId=null, string clientSecret=null, bool? disableSslVerification=null, Dictionary< string, string > headers=null)
 Constructs an IamAuthenticator with all properties. More...
 
 IamAuthenticator (Dictionary< string, string > config)
 Construct an IamAuthenticator instance using properties retrieved from the specified Map. More...
 
override void Authenticate (IClient client)
 Perform the necessary authentication steps for the specified request. More...
 
override void Validate ()
 Validates the current set of configuration information in the Authenticator. More...
 

Protected Member Functions

string GetToken ()
 
DetailedResponse< IamTokenResponseRequestToken ()
 

Properties

IClient Client [get, set]
 
string Apikey [get]
 
string Url [get, set]
 
bool DisableSslVerification [get, set]
 
string ClientId [get, set]
 
string ClientSecret [get, set]
 
Dictionary< string, string > Headers [get, set]
 
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: "
 

Detailed Description

This class implements support for the IAM authentication mechanism.

Constructor & Destructor Documentation

◆ IamAuthenticator() [1/2]

IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.IamAuthenticator ( string  apikey,
string  url = null,
string  clientId = null,
string  clientSecret = null,
bool?  disableSslVerification = null,
Dictionary< string, string >  headers = null 
)
inline

Constructs an IamAuthenticator with all properties.

Parameters
apikeyThe apikey to be used when retrieving the access token
urlThe URL representing the token server endpoint
clientIdThe clientId to be used in token server interactions
clientSecretThe clientSecret to be used in token server interactions
disableSslVerificationA flag indicating whether SSL hostname verification should be disabled
headersA set of user-supplied headers to be included in token server interactions

◆ IamAuthenticator() [2/2]

IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.IamAuthenticator ( Dictionary< string, string >  config)
inline

Construct an IamAuthenticator instance using properties retrieved from the specified Map.

Parameters
configA map containing the configuration properties

Member Function Documentation

◆ Authenticate()

override void IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.Authenticate ( IClient  client)
inlinevirtual

Perform the necessary authentication steps for the specified request.

Reimplemented from IBM.Cloud.SDK.Core.Authentication.Authenticator.

◆ GetToken()

string IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.GetToken ( )
inlineprotected

◆ RequestToken()

DetailedResponse<IamTokenResponse> IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.RequestToken ( )
inlineprotected

◆ Validate()

override void IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.Validate ( )
inlinevirtual

Validates the current set of configuration information in the Authenticator.

Reimplemented from IBM.Cloud.SDK.Core.Authentication.Authenticator.

Property Documentation

◆ Apikey

string IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.Apikey
get

◆ AuthenticationType

override string IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.AuthenticationType
get

◆ Client

IClient IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.Client
getset

◆ ClientId

string IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.ClientId
getset

◆ ClientSecret

string IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.ClientSecret
getset

◆ DisableSslVerification

bool IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.DisableSslVerification
getset

◆ Headers

Dictionary<string, string> IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.Headers
getset

◆ Url

string IBM.Cloud.SDK.Core.Authentication.Iam.IamAuthenticator.Url
getset

The documentation for this class was generated from the following file: