<a id=“SuperOffice_WebApi_AuthorizationUserToken”></a> Class AuthorizationUserToken
Namespace: SuperOffice.WebApiAssembly: SuperOffice.WebApi.dll Username and password are used to get an access token from given username and password If the access token is invalidated, will try to authenticate with username and password to get a new access token. The current access token can be retrieved with <pre><code class=“lang-csharp”>var (_, accessToken) = authInstance.GetAuthorization();</code></pre>
Inheritance
object ← AuthorizationUserTokenImplements
IAuthorizationInherited Members
object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()Remarks
If the access token is omitted on construction, the first agent call will result in three requests:- The first agent call which will fail
- A call to UserAgent.GetCurrentToken with the username and passwor to obtain an access token
- The original agent call which should now succeed with the new access token
Constructors
<a id=“SuperOffice_WebApi_AuthorizationUserToken__ctor_System_String_System_String_System_String_”></a> AuthorizationUserToken(string, string, string)
Parameters
userName string
Users name.
password string
Users password.
accessToken string
Optional access token. Should be a 8A: style bearer token, same as what UserAgent.GetCurrentToken will deliver