Authenticator Class |
Namespace: Telogis.GeoBase.Authentication
The Authenticator type exposes the following members.
Name | Description | |
---|---|---|
Authenticator | Initializes a new instance of the Authenticator class |
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GenerateAuthToken |
Generates an authentication token from the web application server.
| |
GetAuthToken(String, String, String, IPAddress, Int32, DateTime) |
Retrieves an authentication token from the GeoStream server.
| |
GetAuthToken(String, String, String, IPAddress, Int32, TimeSpan) |
Retrieves an authentication token from the GeoStream server.
| |
GetAuthToken(String, String, String, IPAddress, Int32, DateTime, Int32, DateTime) |
Retrieves an authentication token from the GeoStream server.
| |
GetAuthToken(String, String, String, IPAddress, Int32, TimeSpan, Int32, DateTime) |
Retrieves an authentication token from the GeoStream server.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
When the GeoStream server and the web application server are in a trusted relationship, the server key may be held by both servers. This removes the need for the web application to gain authentication. It can instead self-authenticate, and generate a token using GenerateAuthToken.
Related articles: Authenticating with a JavaScript Client.
Guid myAuthToken = new Guid (); IPAddress clientIPAddress = IPAddress.Parse("127.0.0.1"); DateTime expiry = DateTime.UtcNow + TimeSpan.FromMinutes(600); //10 hours ... myAuthToken = GetAuthToken( "http://myServer", "clientName", "clientPassword", clientIPAddress, 24, expiry );
Guid myGeneratedAuthToken = new Guid (); Guid serverKey = new Guid("00000000-0000-0000-0000-000000000000"); IPAddress clientIPAddress = IPAddress.Parse("127.0.0.1"); DateTime expiry = DateTime.UtcNow + TimeSpan.FromMinutes(600); //10 hours ... myGeneratedAuthToken = GenerateAuthToken( serverKey, 1234, "clientPassword", clientIPAddress, 24, expiry );