Avaya Client Services API Reference (iOS)

- Main Page
- Classes
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

Instance Methods | Class Methods | Properties | List of all members
CSUserCredential Class Reference

Represents a user credential that can be used to respond to an authentication credential challenge. More...

`#import <CSUserCredential.h>`

Inherits NSObject.

## Instance Methods
(instancetype) | - initWithUsername:password:domain:ha1String:

## Class Methods
(instancetype) | + credentialWithUsername:andPassword:
| Constructor of a credential using username and password. More...
(instancetype) | + credentialWithUsername:password:andDomain:
| Constructor of a credential using username, password and domain. More...
(instancetype) | + credentialWithUsername:password:domain:andHa1String:
| Constructor of a credential using username, password, domain and HA1 string. More...
(instancetype) | + credentialWithUsername:password:domain:ha1String:expiry:
| Constructor of a credential using username, password, domain and HA1 string. More...
(instancetype) | + credentialWithAccessToken:
| Constructor of a credential using OAuth2 access_token. More...
(instancetype) | + credentialWithAccessToken:expiry:
| Constructor of a credential using OAuth2 access token and expiration time. More...
(instancetype) | + credentialWithAccessToken:expiry:idToken:
| Constructor of a credential using OAuth2 access token and expiration time. More...
(instancetype) | + credentialWithPortalUserToken:
| Constructor of a credential using Portal User Token. More...
(instancetype) | + credentialWithPortalUserToken:expiry:
| Constructor of a credential using Portal User Token. More...

## Properties
NSString * | username
| Username of the credential. More...
NSString * | password
| Password of the credential (empty string if N/A for this credential). More...
NSString * | domain
| Domain of the credential (empty string if N/A for this credential). More...
NSString * | ha1String
| HA1 of the credential (empty string if N/A for this credential). More...
NSString * | portalUserToken
| The Portal User Token of the credential. More...
NSString * | accessToken
| Access token for OAuth2 bearer. More...
NSDate * | credentialExpiry
| The time until which the credential is valid. More...
NSString * | idToken
| OAuth2 ID token containing identity information about the authenticated user. More...

## Detailed Description

Represents a user credential that can be used to respond to an authentication credential challenge.

Credentials may consist of username, password, HA1 String and domain information. Depending on the system configuration, some of the parameters may not be available or applicable for a particular credential. For example, some credential may be made up of username and password only. In such case, the domain and HA1 String will be just empty strings. In some other configurations (e.g., for SIP authentication), the HA1 String and the username are the only user credential information available from the configuration server for a user. In such case, the user credential will have empty strings for password and domain.

This interface includes all of the convenient methods for constructing a UserCredential.

## Method Documentation

+ (instancetype) credentialWithAccessToken: |  | (NSString *) | accessToken |

Constructor of a credential using OAuth2 access_token.

Parameters

  accessToken | OAuth2 access_token

+ (instancetype) credentialWithAccessToken: |  | (NSString *) | accessToken
expiry: |  | (NSDate *) | expiry

Constructor of a credential using OAuth2 access token and expiration time.

When credentialExpiry is set to nil, then credential is only used once.

Parameters

  accessToken | OAuth2 access token
  expiry | Date when token expires.

+ (instancetype) credentialWithAccessToken: |  | (NSString *) | accessToken
expiry: |  | (NSDate *) | expiry
idToken: |  | (NSString *) | idToken

Constructor of a credential using OAuth2 access token and expiration time.

When credentialExpiry is set to nil, then credential is only used once.

Parameters

  accessToken | OAuth2 access token
  expiry | Date when token expires.
  idToken | OAuth2 ID token containing identity information about the user.

+ (instancetype) credentialWithPortalUserToken: |  | (NSString *) | portalUserToken |

Constructor of a credential using Portal User Token.

Parameters

  portalUserToken | token for this credential

+ (instancetype) credentialWithPortalUserToken: |  | (NSString *) | portalUserToken
expiry: |  | (NSDate *) | expiry

Constructor of a credential using Portal User Token.

Parameters

  portalUserToken | token for this credential
  expiry | Date when credential expires

+ (instancetype) credentialWithUsername: |  | (NSString *) | username
andPassword: |  | (NSString *) | password

Constructor of a credential using username and password.

Parameters

  username | username for this credential
  password | password for this credential

+ (instancetype) credentialWithUsername: |  | (NSString *) | username
password: |  | (NSString *) | password
andDomain: |  | (NSString *) | domain

Constructor of a credential using username, password and domain.

Parameters

  username | username for this credential
  password | password for this credential
  domain | domain for this credential (empty string if n/a)

+ (instancetype) credentialWithUsername: |  | (NSString *) | username
password: |  | (NSString *) | password
domain: |  | (NSString *) | domain
andHa1String: |  | (NSString *) | ha1String

Constructor of a credential using username, password, domain and HA1 string.

Parameters

  username | username for this credential
  password | password for this credential (empty string if n/a)
  domain | domain for this credential (empty string if n/a)
  ha1String | HA1 string for this credential (empty string if n/a)

+ (instancetype) credentialWithUsername: |  | (NSString *) | username
password: |  | (NSString *) | password
domain: |  | (NSString *) | domain
ha1String: |  | (NSString *) | ha1String
expiry: |  | (NSDate *) | expiry

Constructor of a credential using username, password, domain and HA1 string.

Parameters

  username | username for this credential
  password | password for this credential (empty string if n/a)
  domain | domain for this credential (empty string if n/a)
  ha1String | HA1 string for this credential (empty string if n/a)
  expiry | Date when credential expires

- (instancetype) initWithUsername: |  | (NSString *) | username
password: |  | (NSString *) | password
domain: |  | (NSString *) | domain
ha1String: |  | (NSString *) | ha1String

## Property Documentation

- (NSString*) accessToken
| readatomicassign

Access token for OAuth2 bearer.

- (NSDate*) credentialExpiry
| readatomicassign

The time until which the credential is valid.

When credentialExpiry is set to nil, then credential is only used once.

- (NSString*) domain
| readatomicassign

Domain of the credential (empty string if N/A for this credential).

- (NSString*) ha1String
| readatomicassign

HA1 of the credential (empty string if N/A for this credential).

- (NSString*) idToken
| readatomicassign

OAuth2 ID token containing identity information about the authenticated user.

- (NSString*) password
| readatomicassign

Password of the credential (empty string if N/A for this credential).

- (NSString*) portalUserToken
| readatomicassign

The Portal User Token of the credential.

- (NSString*) username
| readatomicassign

Username of the credential.

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

- CSUserCredential.h