This commit is contained in:
parent
46f5c107b8
commit
fa34ed249b
233 changed files with 4000 additions and 1396 deletions
14
Yavsc/Model/Auth/Application.cs
Normal file
14
Yavsc/Model/Auth/Application.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc
|
||||
{
|
||||
public class Application : IApplication
|
||||
{
|
||||
[Key]
|
||||
public string ApplicationID { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
public string RedirectUri { get; set; }
|
||||
public string LogoutRedirectUri { get; set; }
|
||||
public string Secret { get; set; }
|
||||
}
|
||||
}
|
||||
10
Yavsc/Model/Auth/Scope.cs
Normal file
10
Yavsc/Model/Auth/Scope.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
namespace Yavsc.Models.Auth {
|
||||
public class Scope {
|
||||
|
||||
public string Id { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
20
Yavsc/Model/Auth/UserCredentials.cs
Normal file
20
Yavsc/Model/Auth/UserCredentials.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
namespace Yavsc.Models.Auth {
|
||||
|
||||
public class UserCredential {
|
||||
public string UserId { get; set; }
|
||||
|
||||
public OAuth2Tokens Tokens { get; set; }
|
||||
public UserCredential(string userId, OAuth2Tokens tokens)
|
||||
{
|
||||
UserId = userId;
|
||||
Tokens = tokens;
|
||||
}
|
||||
|
||||
public string GetHeader()
|
||||
{
|
||||
return Tokens.TokenType+" "+Tokens.AccessToken;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue