C# Class PreStorm.Token

Abstracts the ArcGIS Server token and its generation.
显示文件 Open project: jshirota/PreStorm Class Usage Examples

Public Methods

Method Description
GenerateToken ( string url, string userName, string password, int expiration = null ) : Token

Generates a token for the service url.

ToString ( ) : string

Returns the token string.

Token ( Token>.Func generateToken ) : System

Initializes a new instance of the Token class based on a delegate function for generating the token from the service url.

Token ( string token ) : System

Initializes a new instance of the Token class based on an existing token string.

Token ( string userName, string password ) : System

Initializes a new instance of the Token class based on the credentials. When the token is generated this way, it is self-renewing and will not expire.

Token ( string url, string userName, string password ) : System

Initializes a new instance of the Token class based on the credentials. When the token is generated this way, it is self-renewing and will not expire.

Private Methods

Method Description
Token ( string token, System.DateTime expiry ) : System

Method Details

GenerateToken() public static method

Generates a token for the service url.
public static GenerateToken ( string url, string userName, string password, int expiration = null ) : Token
url string
userName string
password string
expiration int
return Token

ToString() public method

Returns the token string.
public ToString ( ) : string
return string

Token() public method

Initializes a new instance of the Token class based on a delegate function for generating the token from the service url.
public Token ( Token>.Func generateToken ) : System
generateToken Token>.Func
return System

Token() public method

Initializes a new instance of the Token class based on an existing token string.
public Token ( string token ) : System
token string The token string.
return System

Token() public method

Initializes a new instance of the Token class based on the credentials. When the token is generated this way, it is self-renewing and will not expire.
public Token ( string userName, string password ) : System
userName string
password string
return System

Token() public method

Initializes a new instance of the Token class based on the credentials. When the token is generated this way, it is self-renewing and will not expire.
public Token ( string url, string userName, string password ) : System
url string
userName string
password string
return System