Class LanguageCloudIdentityApi
Singleton implementation that provides LanguageCloud Identity access.
Inheritance
Implements
Namespace: Sdl.LanguageCloud.IdentityApi
Assembly: Sdl.LanguageCloud.IdentityApi.dll
Syntax
public class LanguageCloudIdentityApi : Object, ILanguageCloudIdentityApi
Properties
AccessToken
Singleton implementation that provides LanguageCloud Identity access.
Declaration
public string AccessToken { get; }
Property Value
Type | Description |
---|---|
String |
ActiveAccountId
Singleton implementation that provides LanguageCloud Identity access.
Declaration
public string ActiveAccountId { get; }
Property Value
Type | Description |
---|---|
String |
ActiveTenantId
Singleton implementation that provides LanguageCloud Identity access.
Declaration
public string ActiveTenantId { get; }
Property Value
Type | Description |
---|---|
String |
ActiveUserId
Singleton implementation that provides LanguageCloud Identity access.
Declaration
public string ActiveUserId { get; }
Property Value
Type | Description |
---|---|
String |
BaseUrl
Singleton implementation that provides LanguageCloud Identity access.
Declaration
public string BaseUrl { get; }
Property Value
Type | Description |
---|---|
String |
Instance
Singleton instance
Declaration
public static ILanguageCloudIdentityApi Instance { get; }
Property Value
Type | Description |
---|---|
ILanguageCloudIdentityApi |
LanguageCloudCredential
Access to information about the LanguageCloud credential in use.
Declaration
public LanguageCloudCredentialInfo LanguageCloudCredential { get; }
Property Value
Type | Description |
---|---|
LanguageCloudCredentialInfo |
StudioApplicationKey
The key used for identifying calls made from Trados Studio.
Declaration
public string StudioApplicationKey { get; }
Property Value
Type | Description |
---|---|
String |
StudioClientId
The key used for identifying login calls made from Trados Studio.
Declaration
public string StudioClientId { get; }
Property Value
Type | Description |
---|---|
String |
Methods
EnsureValidConnection()
Singleton implementation that provides LanguageCloud Identity access.
Declaration
public void EnsureValidConnection()
LoginWithToken(LoginData)
Singleton implementation that provides LanguageCloud Identity access.
Declaration
public bool LoginWithToken(LoginData loginData)
Parameters
Type | Name | Description |
---|---|---|
LoginData | loginData |
Returns
Type | Description |
---|---|
Boolean |
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
public bool Logout()
Returns
Type | Description |
---|---|
Boolean | True if logout succeeded. False if logout failed |
TryLogin(out String, Boolean)
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. |
Boolean | showLoginDialog | Optional parameter that specifies if the Studio dialog for Login should be displayed. |
Returns
Type | Description |
---|---|
Boolean | 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
Type | Description |
---|---|
EventHandler |