refactorisation : separation du code serveur d'authentification
This commit is contained in:
parent
f8eef31fb3
commit
b462350d72
57 changed files with 5452 additions and 108 deletions
42
OAuth.AspNet.AuthServer/OAuthGrantCustomExtensionContext.cs
Normal file
42
OAuth.AspNet.AuthServer/OAuthGrantCustomExtensionContext.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using Microsoft.AspNet.Http;
|
||||
|
||||
namespace OAuth.AspNet.AuthServer
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Provides context information used when handling OAuth extension grant types.
|
||||
/// </summary>
|
||||
public class OAuthGrantCustomExtensionContext : BaseValidatingTicketContext<OAuthAuthorizationServerOptions>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OAuthGrantCustomExtensionContext"/> class
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <param name="options"></param>
|
||||
/// <param name="clientId"></param>
|
||||
/// <param name="grantType"></param>
|
||||
/// <param name="parameters"></param>
|
||||
public OAuthGrantCustomExtensionContext(HttpContext context, OAuthAuthorizationServerOptions options, string clientId, string grantType, IReadableStringCollection parameters) : base(context, options, null)
|
||||
{
|
||||
ClientId = clientId;
|
||||
GrantType = grantType;
|
||||
Parameters = parameters;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the OAuth client id.
|
||||
/// </summary>
|
||||
public string ClientId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the OAuth extension grant type.
|
||||
/// </summary>
|
||||
public string GrantType { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of additional parameters from the token request.
|
||||
/// </summary>
|
||||
public IReadableStringCollection Parameters { get; private set; }
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue