Class LanguageCloudIdentityApi
Singleton implementation that provides LanguageCloud Identity access.
Inheritance
LanguageCloudIdentityApi
Assembly: Sdl.LanguageCloud.IdentityApi.dll
Syntax
public class LanguageCloudIdentityApi : ILanguageCloudIdentityApi
Properties
AccessToken
Declaration
public string AccessToken { get; }
Property Value
ActiveAccountId
Declaration
[Obsolete("No longer available")]
public string ActiveAccountId { get; }
Property Value
ActiveTenantId
Declaration
public string ActiveTenantId { get; }
Property Value
ActiveUserId
Declaration
public string ActiveUserId { get; }
Property Value
BaseUrl
Declaration
public string BaseUrl { get; }
Property Value
Instance
Declaration
public static ILanguageCloudIdentityApi Instance { get; }
Property Value
LanguageCloudCredential
Access to information about the LanguageCloud credential in use.
Declaration
public LanguageCloudCredentialInfo LanguageCloudCredential { get; }
Property Value
StudioApplicationKey
The key used for identifying calls made from Trados Studio.
Declaration
public string StudioApplicationKey { get; }
Property Value
StudioClientId
The key used for identifying login calls made from Trados Studio.
Declaration
public string StudioClientId { get; }
Property Value
Methods
EnsureValidConnection()
Declaration
public void EnsureValidConnection()
LoginWithToken(LoginData)
Declaration
public bool LoginWithToken(LoginData loginData)
Parameters
Returns
Logout()
Logout from LanguageCloud and clear any credentials stored in memory.
Returns a bool value representing the success or failure of the logout operation.
Declaration
Returns
Type |
Description |
bool |
True if logout succeeded. False if logout failed
|
TryLogin(out string, bool)
Login to LanguageCloud using the credentials stored in memory or provided through the Login dialog. Returns a bool value representing the success or failure of the login operation.
Declaration
public bool TryLogin(out string errorMessage, bool showLoginDialog = true)
Parameters
Type |
Name |
Description |
string |
errorMessage |
A string containing an error message if the login failed.
|
bool |
showLoginDialog |
Optional parameter that specifies if the Studio dialog for Login should be displayed.
|
Returns
Type |
Description |
bool |
True if login succeeded. False if login failed
|
Events
LoginStatusChanged
Raised when login, logout or switch account actions occur.
Declaration
public event EventHandler LoginStatusChanged
Event Type
Implements
Extension Methods