Added CORS, added specific type for token in AuthToken.cs, added login page to blazor client
This commit is contained in:
		| @@ -413,7 +413,7 @@ namespace VisaApiClient | ||||
|         /// </summary> | ||||
|         /// <returns>Success</returns> | ||||
|         /// <exception cref="ApiException">A server side error occurred.</exception> | ||||
|         public virtual System.Threading.Tasks.Task<string> LoginAsync(string? email, string? password) | ||||
|         public virtual System.Threading.Tasks.Task<AuthToken> LoginAsync(string? email, string? password) | ||||
|         { | ||||
|             return LoginAsync(email, password, System.Threading.CancellationToken.None); | ||||
|         } | ||||
| @@ -424,7 +424,7 @@ namespace VisaApiClient | ||||
|         /// </summary> | ||||
|         /// <returns>Success</returns> | ||||
|         /// <exception cref="ApiException">A server side error occurred.</exception> | ||||
|         public virtual async System.Threading.Tasks.Task<string> LoginAsync(string? email, string? password, System.Threading.CancellationToken cancellationToken) | ||||
|         public virtual async System.Threading.Tasks.Task<AuthToken> LoginAsync(string? email, string? password, System.Threading.CancellationToken cancellationToken) | ||||
|         { | ||||
|             var client_ = _httpClient; | ||||
|             var disposeClient_ = false; | ||||
| @@ -475,7 +475,7 @@ namespace VisaApiClient | ||||
|                         var status_ = (int)response_.StatusCode; | ||||
|                         if (status_ == 200) | ||||
|                         { | ||||
|                             var objectResponse_ = await ReadObjectResponseAsync<string>(response_, headers_, cancellationToken).ConfigureAwait(false); | ||||
|                             var objectResponse_ = await ReadObjectResponseAsync<AuthToken>(response_, headers_, cancellationToken).ConfigureAwait(false); | ||||
|                             if (objectResponse_.Object == null) | ||||
|                             { | ||||
|                                 throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); | ||||
| @@ -1583,6 +1583,14 @@ namespace VisaApiClient | ||||
|  | ||||
|     } | ||||
|  | ||||
|     [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] | ||||
|     public partial class AuthToken | ||||
|     { | ||||
|         [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||||
|         public string? Token { get; set; } = default!; | ||||
|  | ||||
|     } | ||||
|  | ||||
|     [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] | ||||
|     public enum AuthorityRequestStatuses | ||||
|     { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user