C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
OauthAccessToken.cs
Go to the documentation of this file.
1using System.Runtime.Serialization;
2
4{
10 {
11 #region APIResource Interface Members
15 public static readonly string CLASS_COLLECTION_NAME = "access_tokens";
17 public override string collection_name => CLASS_COLLECTION_NAME;
18 #endregion APIResource Interface Members
19
23 [IgnoreDataMember]
24 public string AuthorizationMethod => "bearer";
25
29 [DataMember(Order = 11)]
30 public string access_token
31 {
32 get => id;
33 set => id = value;
34 }
38 [DataMember(Order = 12)]
39 public AccessTokenStatus status { get; set; }
43 [DataMember(Order = 13)]
44 public string authorize_url { get; set; }
45
50 {
51 status = AccessTokenStatus.Unknown;
52 }
53
58 public override string ToString() => $"{AuthorizationMethod} {access_token}";
59 }
60}
Base class used by all resources.
string id
The resource's unique identifier. It will be used in the request URL when requesting the resource fro...
An AccessToken storing OAuth authentication information for requests made to the server.
OauthAccessToken()
Construct a new unauthorized AccessToken.
override string collection_name
The relative path from the root of the API at which the collection of resources of this type reside.
AccessTokenStatus status
The AccessToken's current AccessTokenStatus (unauthorized / valid).
static readonly string CLASS_COLLECTION_NAME
The collection endpoint at which resources of this type reside on the server.
string authorize_url
The URL the user can navigate to authenticate with this server.
string access_token
The AccessToken identifier.
override string ToString()
Returns the representation of this access token that could be placed in an "Authorization" header.
string AuthorizationMethod
The Authorization Method included in the Authorization header.
An AccessToken storing authentication information for requests made to the server.
AccessTokenStatus
An AccessToken's status (unauthorized / valid).