Class Credentials
- Namespace
- Geotab.Checkmate.ObjectModel
- Assembly
- Geotab.Checkmate.ObjectModel.dll
The authentication credentials for a User used when making calls to MyGeotab.
public class Credentials : ICredentials
- Inheritance
-
Credentials
- Implements
- Inherited Members
Constructors
Credentials()
Initializes a new instance of the Credentials class.
public Credentials()
Credentials(string?, string?, string?, string?, string?)
Initializes a new instance of the Credentials class.
public Credentials(string? database, string? username, string? password, string? sessionId, string? refreshToken = null)
Parameters
databasestringusers database.
usernamestringuser name.
passwordstringuser password.
sessionIdstringsession id.
refreshTokenstringrefresh token.
Fields
ThisServer
The ThisServer constant meaning that the credentials aren't on another server.
public const string ThisServer = "ThisServer"
Field Value
Properties
Database
Gets or sets the database name.
public string? Database { get; set; }
Property Value
Password
Gets or sets the users login password. This can be used instead of providing a session Id. It is mutually exclusive with SessionId.
public string? Password { get; set; }
Property Value
RefreshToken
Gets or sets the refresh token.
public string? RefreshToken { get; set; }
Property Value
SessionId
Gets or sets the session Id is a token which is generated from an authentication call and can be used instead of providing the password each time. It is mutually exclusive with Password.
public string? SessionId { get; set; }
Property Value
UserName
Gets or sets the MyGeotab username.
public string? UserName { get; set; }
Property Value
Methods
CreateDatabaseNameFromCompany(string)
Creates the database name from supplied company. Honours certain rules about naming databases.
public static string CreateDatabaseNameFromCompany(string companyName)
Parameters
companyNamestringName of the company.
Returns
- string
Sanitized company name.
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()