Added User credential authentication

This commit is contained in:
luke-else
2021-10-31 18:58:30 +00:00
parent d86378a9a8
commit a4a52d0383
5 changed files with 137 additions and 12 deletions

19
Models/JSON/Login.cs Normal file
View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using System.Threading.Tasks;
namespace EFB.Models.JSON
{
public class Login
{
[JsonProperty]
public string grant_type { get; set; }
[JsonProperty]
public string client_id { get; set; }
[JsonProperty]
public string client_secret { get; set; }
}
}

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace EFB.Models.JSON
{
public class LoginResponse
{
[JsonProperty]
public string access_token { get; set; }
[JsonProperty]
public int expires_in { get; set; }
[JsonProperty]
public string token_type { get; set; }
[JsonProperty]
public string scope { get; set; }
[JsonProperty]
public string error { get; set; } = null;
[JsonProperty]
public string error_description { get; set; } = null;
}
}