yavsc/cli/Settings/ConnectionSettings.cs

34 lines
962 B
C#
Raw Normal View History

2018-07-26 17:10:57 +02:00
namespace cli
{
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
public class ConnectionSettings
{
2018-08-05 04:16:21 +02:00
public string ClientId { get; set; }
public string ClientSecret { get; set; }
public string Authority { get; set; }
public string Audience { get; set; }
2018-07-26 17:10:57 +02:00
public string SiteAccessSheme { get; set; } = "http";
public string Scope { get; set; } = "profile";
[NotMapped]
[JsonIgnore]
public string AuthorizeUrl {get {
2018-08-05 04:16:21 +02:00
return $"{SiteAccessSheme}://{Authority}/authorize";
2018-07-26 17:10:57 +02:00
} }
[NotMapped]
[JsonIgnore]
public string RedirectUrl {get {
2018-08-05 04:16:21 +02:00
return $"{SiteAccessSheme}://{Authority}/oauth/success";
2018-07-26 17:10:57 +02:00
} }
[NotMapped]
[JsonIgnore]
public string AccessTokenUrl {get {
2018-08-05 04:16:21 +02:00
return $"{SiteAccessSheme}://{Authority}/token";
2018-07-26 17:10:57 +02:00
} }
2018-08-05 04:16:21 +02:00
2018-07-26 17:10:57 +02:00
}
}