If you want to use the authorization token in a different HttpClient
use the AccessToken
object returned by these methods, or use the GetAccessToken
method.
Table 1. Login and access token, using the Credential Manager .NET signature
Library method name |
TryLogin
|
Description |
Login to the client. |
Method signature |
AccessToken TryLogin(string credManTarget, bool refresh = true);
|
Method input parameters |
-
credManTarget : name of the credential defined in Windows Credential Manager.
-
refresh : if true, use to refresh the value of the returned token.
|
Return value |
An AccessToken object. |
Table 2. Login and access tokens method, using the username and password .NET signature
Library method name |
TryLogin
|
Description |
Login to the client. |
Method signature |
TryLogin(string username, string password, bool refresh = true);
|
Method input parameters |
-
username : API user name defined to login to Metasys.
-
password : password defined to login to Metasys (for API user).
-
refresh : if true, use to refresh the value of the returned token.
|
Return value |
An AccessToken object. |