34 lines
962 B
C#
34 lines
962 B
C#
|
7 years ago
|
namespace cli
|
||
|
|
{
|
||
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
||
|
|
using Newtonsoft.Json;
|
||
|
|
|
||
|
|
public class ConnectionSettings
|
||
|
|
{
|
||
|
7 years ago
|
public string ClientId { get; set; }
|
||
|
|
public string ClientSecret { get; set; }
|
||
|
|
public string Authority { get; set; }
|
||
|
|
public string Audience { get; set; }
|
||
|
7 years ago
|
public string SiteAccessSheme { get; set; } = "http";
|
||
|
|
public string Scope { get; set; } = "profile";
|
||
|
|
|
||
|
|
[NotMapped]
|
||
|
|
[JsonIgnore]
|
||
|
|
public string AuthorizeUrl {get {
|
||
|
7 years ago
|
return $"{SiteAccessSheme}://{Authority}/authorize";
|
||
|
7 years ago
|
} }
|
||
|
|
|
||
|
|
[NotMapped]
|
||
|
|
[JsonIgnore]
|
||
|
|
public string RedirectUrl {get {
|
||
|
7 years ago
|
return $"{SiteAccessSheme}://{Authority}/oauth/success";
|
||
|
7 years ago
|
} }
|
||
|
|
|
||
|
|
[NotMapped]
|
||
|
|
[JsonIgnore]
|
||
|
|
public string AccessTokenUrl {get {
|
||
|
7 years ago
|
return $"{SiteAccessSheme}://{Authority}/token";
|
||
|
7 years ago
|
} }
|
||
|
7 years ago
|
|
||
|
7 years ago
|
}
|
||
|
|
}
|