Appearance
AuthenticationContext Class
Definition
Authentication to use against a ServiceNow instance
- Namespace:
JASE.ServiceNow - Assembly:
JASE.ServiceNow.dll
Properties
| Name | Description |
|---|---|
ApiKey | Specifies the API key used for authenticating with the ServiceNow API when Mode ==ApiKey. |
ApiKeyHeader | Specifies the Request Header for API Key authentication. (Default: x-sn-apikey) |
Credentials | Gets the credentials used for authenticating with the ServiceNow API when Mode == BasicAuth. |
Default | Returns the process-wide default authentication context. |
Mode | Specifies the default Authentication mode when accessing a ServiceNow instance. (Default: BasicAuth) |
Token | Gets the credentials used for authenticating with the ServiceNow API when Mode == OAuthBearer. |
Methods
| Name | Description |
|---|---|
AuthenticationContext CreateApiKey(string apiKey, string apiHeader = null) | Creates an authentication context that uses an API key passed in a request header. |
AuthenticationContext CreateAuthToken(AuthenticationToken token) | Creates an authentication context that uses OAuth Bearer authentication. |
AuthenticationContext CreateAuthToken(AuthenticationTokenResult result) | Creates an authentication context that uses OAuth Bearer authentication. |
AuthenticationContext CreateBasicAuth(string username, string password) | Creates an authentication context that uses HTTP Basic authentication. |
void SetDefault(AuthenticationContext defaultContext) | Sets the process-wide default authentication context. |