Authentication Web Service methods

getToken(username:string, password:string):string

getToken
(username:string, password:string, expiration:integer):string

getVersion
:string

validateToken
(token:string):integer

 

Method Name

getToken

Description

Returns a token with an expiration of 60 minutes.

Endpoint URL

https://arcweb.esri.com/services/v2/Authentication

Input Parameters

username

string

password string

Valid Arguments

username

Username. Case sensitive.
password Password. Case sensitive.

Output Parameter

Result

token, encrypted username, password, timeout period, and requester's IP: string

Example (Java)

IAuthentication myAuthentication = AuthenticationHelper.bind();

string token = myAuthentication.getToken("[username]","[password]");

Example (VB.NET)

Dim myAuthentication As New Authentication()
Dim token as String
token = myAuthentication.getToken("[username]","[password]")

Example (C#.NET)

Authentication myAuthentication = new Authentication();
string token = myAuthentication.getToken("[username]","[password]");

 

Method Name

getToken

Description

Returns a token with the requested expiration.

Endpoint URL

https://arcweb.esri.com/services/v2/Authentication

Input Parameters

username

string

password string
expiration

integer

Valid Arguments

username

Username. Case sensitive.
password Password. Case sensitive.
expiration Minutes to expiration. Note: Maximum value is 1440.

Output Parameter

Result

token, encrypted username, password, timeout period, and requester's IP: string

Example (Java)

IAuthentication myAuthentication = AuthenticationHelper.bind();

string token = myAuthentication.getToken("[username]","[password]",5);

Example (VB.NET)

Dim myAuthentication As New Authentication()
Dim token as String
token = myAuthentication.getToken("[username]","[password]", 5)

Example (C#.NET)

Authentication myAuthentication = new Authentication();
string token = myAuthentication.getToken("[username]","[password]", 5);

 

Method Name getVersion
Description Returns the version number of Authentication Web Service.
Endpoint URL https://arcweb.esri.com/services/v2/Authentication
Output Parameter
Result string

Example (Java)

IAuthentication myAuthentication = AuthenticationHelper.bind();

string version = myAuthentication.getVersion();

Example (VB.NET)

Dim myAuthenticaion As New Authentication()
Dim Version As String
Version = myAuthentiction.getVersion()

Example (C#.NET)

Authentication myAuthentication = new Authentication();
string version = myAuthentication.getVersion();

 

Method Name

validateToken

Description

Validates a token and returns the number of minutes left.

Endpoint URL

https://arcweb.esri.com/services/v2/Authentication

Input Parameter

token

string

Valid Arguments

token

token (string) for accessing ArcWeb Services.

Output Parameter

Result

integer: minutes left on token (>0).

Example (Java)

IAuthentication myAuthentication = AuthenticationHelper.bind();

string token = myAuthentication.getToken("[username]","[password]");

int tokenToExpire = myAuthentication.validateToken(token);

Example (VB.NET)

Dim myAuthenticaion As New Authentication()
Dim tokenToExpire As Integer
Dim token as String
token = myAuthentication.getToken("[username]","[password]")
tokenToExpire = myAuthentication.validateToken(token)

Example (C#.NET)

Authentication myAuthentication = new Authentication();

string token = myAuthentication.getToken("[username]","[password]");
int tokenToExpire = myAuthentication.validateToken(token);

 


See also

Authentication overview

SOAP samples


Object model