AGSCredential Class Reference
Description
Instances of this class represent a credential object to access a secured ArcGIS resource. The resource could be secured using ArcGIS tokens or HTTP (basic or digest) authentication.
- Defined in:
- AGSCredential.h ( ArcGIS library)
- Since:
- 1.0
List of all members.
Member Function Documentation
+ (NSURL*) getTokenServiceUrl: |
|
(NSURL *) |
url |
|
|
Helper method to deduce the URL for a token service.
- Parameters:
-
| url | URL of the resource you wish to access. |
- Returns:
- The URL of the token service.
- Since:
- 1.0
- (id) initWithToken: |
|
(NSString *) |
token |
|
|
Initialize an AGSCredential object with a short-lived token. This token will be used to access the secured resource.
- Parameters:
-
| token | The short-lived token to initialize the credential object. |
- Returns:
- A new, initialized
AGSCredential
.
- Since:
- 1.8
- (id) initWithToken: |
|
(NSString *) |
token |
referer: |
|
(NSString *) |
referer | |
|
|
| | |
Initialize an AGSCredential object with a long-lived token and referer. This token will be used to access the secured resource.
- Parameters:
-
| token | The long-lived token to initialize the credential object. |
| referer | The referer to be sent along with token in the request. |
- Returns:
- A new, initialized
AGSCredential
.
- Since:
- 1.8
- (id) initWithUser: |
|
(NSString *) |
username |
password: |
|
(NSString *) |
password | |
|
|
| | |
Initialize an AGSCredential
object.
- Parameters:
-
| username | The username of user attempting to access secured resource. |
| password | The password of user attempting to access secured resource. |
- Returns:
- A new, initialized
AGSCredential
.
- Since:
- 1.0
- (id) initWithUser: |
|
(NSString *) |
username |
password: |
|
(NSString *) |
password |
authenticationType: |
|
(AGSAuthenticationType) |
authType | |
|
|
| | |
Initialize an AGSCredential object when you know the authType.
- Parameters:
-
| username | The username of user attempting to access secured resource. |
| password | The passwordof user attempting to access secured resource. |
| authType | The authentication type to be used when accessing secured resource. |
- Returns:
- A new, initialized
AGSCredential
.
- Since:
- 1.0
- (id) initWithUser: |
|
(NSString *) |
username |
password: |
|
(NSString *) |
password |
authenticationType: |
|
(AGSAuthenticationType) |
authType |
tokenUrl: |
|
(NSURL *) |
tokenUrl | |
|
|
| | |
Initialize an AGSCredential object when you know the authType and tokenUrl.
- Parameters:
-
| username | The username of user attempting to access secured resource. |
| password | The password of user attempting to access secured resource. |
| authType | The authentication type to be used when accessing secured resource. |
| tokenUrl | The token service URL to be used to retrieve a token with given credentials. |
- Returns:
- A new, initialized
AGSCredential
.
- Since:
- 1.0
Determines the type of security, if any, of a resource with a given url.
- Parameters:
-
| url | URL of the resource you wish to access. |
- Returns:
- The authentication type needed to access the specified resource.
- Since:
- 1.0
Property Documentation
The type of authentication needed to access a secured resource. Possibile values include
AGSAuthenticationTypeUnknown
AGSAuthenticationTypeNone
AGSAuthenticationTypeToken
AGSAuthenticationTypeHTTP
- Since:
- 1.0
- (NSString*) password [read, write, retain] |
Password used to access secured resource or retrieve a token.
- Since:
- 1.0
- (NSString*) referer [read, retain] |
A string representing the referer for which the long-lived token was generated.
- Since:
- 1.8
- (NSString*) token [read, write, retain] |
Generated by the server from a username/password combination.
- Since:
- 1.0
- (NSURL*) tokenUrl [read, write, copy] |
Url to the token service.
- Since:
- 1.0
- (NSString*) username [read, write, retain] |
Username used to access secured resource or retrieve a token.
- Since:
- 1.0