Click or drag to resize

Authenticator Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Contains methods used to authenticate JavaScript clients against a GeoStream server or web application server.
Inheritance Hierarchy
SystemObject
  Telogis.GeoBase.AuthenticationAuthenticator

Namespace:  Telogis.GeoBase.Authentication
Assembly:  geobase.net (in geobase.net.dll) Version: 4.83.0.0
Syntax
public class Authenticator

The Authenticator type exposes the following members.

Constructors
  NameDescription
Public methodAuthenticator
Initializes a new instance of the Authenticator class
Top
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Public methodStatic memberGenerateAuthToken
Generates an authentication token from the web application server.
Public methodStatic memberGetAuthToken(String, String, String, IPAddress, Int32, DateTime)
Retrieves an authentication token from the GeoStream server.
Public methodStatic memberGetAuthToken(String, String, String, IPAddress, Int32, TimeSpan)
Retrieves an authentication token from the GeoStream server.
Public methodStatic memberGetAuthToken(String, String, String, IPAddress, Int32, DateTime, Int32, DateTime)
Retrieves an authentication token from the GeoStream server.
Public methodStatic memberGetAuthToken(String, String, String, IPAddress, Int32, TimeSpan, Int32, DateTime)
Retrieves an authentication token from the GeoStream server.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top
Remarks
Authentication is dependent on the relationship between the GeoStream server and the web application server (that is, whether it is part of a trusted relationship or not). When not in a trusted relationship, the server key is held by the GeoStream server and a token must be retrieved by the web application invoking one of the available GetAuthToken methods.

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.

Examples
GetAuthToken:
C#
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
);
GenerateAuthToken:
C#
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
);
See Also