Avaya Client Services API Reference (OS X)
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) + 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...
 

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
accessTokenOAuth2 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
accessTokenOAuth2 access token
expiryDate when token expires.
+ (instancetype) credentialWithPortalUserToken: (NSString *)  portalUserToken

Constructor of a credential using Portal User Token.

Parameters
portalUserTokentoken for this credential
+ (instancetype) credentialWithPortalUserToken: (NSString *)  portalUserToken
expiry: (NSDate *)  expiry 

Constructor of a credential using Portal User Token.

Parameters
portalUserTokentoken for this credential
expiryDate when credential expires
+ (instancetype) credentialWithUsername: (NSString *)  username
andPassword: (NSString *)  password 

Constructor of a credential using username and password.

Parameters
usernameusername for this credential
passwordpassword for this credential
+ (instancetype) credentialWithUsername: (NSString *)  username
password: (NSString *)  password
andDomain: (NSString *)  domain 

Constructor of a credential using username, password and domain.

Parameters
usernameusername for this credential
passwordpassword for this credential
domaindomain 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
usernameusername for this credential
passwordpassword for this credential (empty string if n/a)
domaindomain for this credential (empty string if n/a)
ha1StringHA1 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
usernameusername for this credential
passwordpassword for this credential (empty string if n/a)
domaindomain for this credential (empty string if n/a)
ha1StringHA1 string for this credential (empty string if n/a)
expiryDate 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*) 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: