Permalink
Browse files

Introduce new events to allow controlling the signin, signout and cha…

…llenge operations
  • Loading branch information...
PinpointTownes committed Oct 7, 2017
1 parent 8effbcf commit d95810b28167409b8b9e60059568341fef113eb8
@@ -0,0 +1,51 @@
/*
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* See https://github.com/aspnet-contrib/AspNet.Security.OpenIdConnect.Server
* for more information concerning the license and the contributors participating to this project.
*/
using AspNet.Security.OpenIdConnect.Primitives;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
namespace AspNet.Security.OpenIdConnect.Server
{
/// <summary>
/// Represents the context class associated with the
/// <see cref="OpenIdConnectServerProvider.ProcessChallengeResponse"/> event.
/// </summary>
public class ProcessChallengeResponseContext : BaseControlContext
{
/// <summary>
/// Creates a new instance of the <see cref="ProcessChallengeResponseContext"/> class.
/// </summary>
public ProcessChallengeResponseContext(
HttpContext context,
OpenIdConnectServerOptions options,
AuthenticationTicket ticket,
OpenIdConnectRequest request,
OpenIdConnectResponse response)
: base(context)
{
Options = options;
Ticket = ticket;
Request = request;
Response = response;
}
/// <summary>
/// Gets the options used by the OpenID Connect server.
/// </summary>
public OpenIdConnectServerOptions Options { get; }
/// <summary>
/// Gets the authorization or token request.
/// </summary>
public new OpenIdConnectRequest Request { get; }
/// <summary>
/// Gets the authorization or token response.
/// </summary>
public new OpenIdConnectResponse Response { get; }
}
}
@@ -0,0 +1,83 @@
/*
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* See https://github.com/aspnet-contrib/AspNet.Security.OpenIdConnect.Server
* for more information concerning the license and the contributors participating to this project.
*/
using AspNet.Security.OpenIdConnect.Primitives;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
namespace AspNet.Security.OpenIdConnect.Server
{
/// <summary>
/// Represents the context class associated with the
/// <see cref="OpenIdConnectServerProvider.ProcessSigninResponse"/> event.
/// </summary>
public class ProcessSigninResponseContext : BaseControlContext
{
/// <summary>
/// Creates a new instance of the <see cref="ProcessSigninResponseContext"/> class.
/// </summary>
public ProcessSigninResponseContext(
HttpContext context,
OpenIdConnectServerOptions options,
AuthenticationTicket ticket,
OpenIdConnectRequest request,
OpenIdConnectResponse response)
: base(context)
{
Options = options;
Ticket = ticket;
Request = request;
Response = response;
}
/// <summary>
/// Gets the options used by the OpenID Connect server.
/// </summary>
public OpenIdConnectServerOptions Options { get; }
/// <summary>
/// Gets the authorization or token request.
/// </summary>
public new OpenIdConnectRequest Request { get; }
/// <summary>
/// Gets the authorization or token response.
/// </summary>
public new OpenIdConnectResponse Response { get; }
/// <summary>
/// Gets or sets a boolean indicating whether an access token
/// should be returned to the client application.
/// Note: overriding the value of this property is generally not
/// recommended, except when dealing with non-standard clients.
/// </summary>
public bool IncludeAccessToken { get; set; }
/// <summary>
/// Gets or sets a boolean indicating whether an authorization code
/// should be returned to the client application.
/// Note: overriding the value of this property is generally not
/// recommended, except when dealing with non-standard clients.
/// </summary>
public bool IncludeAuthorizationCode { get; set; }
/// <summary>
/// Gets or sets a boolean indicating whether an identity token
/// should be returned to the client application.
/// Note: overriding the value of this property is generally not
/// recommended, except when dealing with non-standard clients.
/// </summary>
public bool IncludeIdentityToken { get; set; }
/// <summary>
/// Gets or sets a boolean indicating whether a refresh token
/// should be returned to the client application.
/// Note: overriding the value of this property is generally not
/// recommended, except when dealing with non-standard clients.
/// </summary>
public bool IncludeRefreshToken { get; set; }
}
}
@@ -0,0 +1,51 @@
/*
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* See https://github.com/aspnet-contrib/AspNet.Security.OpenIdConnect.Server
* for more information concerning the license and the contributors participating to this project.
*/
using AspNet.Security.OpenIdConnect.Primitives;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
namespace AspNet.Security.OpenIdConnect.Server
{
/// <summary>
/// Represents the context class associated with the
/// <see cref="OpenIdConnectServerProvider.ProcessSignoutResponse"/> event.
/// </summary>
public class ProcessSignoutResponseContext : BaseControlContext
{
/// <summary>
/// Creates a new instance of the <see cref="ProcessSignoutResponseContext"/> class.
/// </summary>
public ProcessSignoutResponseContext(
HttpContext context,
OpenIdConnectServerOptions options,
AuthenticationTicket ticket,
OpenIdConnectRequest request,
OpenIdConnectResponse response)
: base(context)
{
Options = options;
Ticket = ticket;
Request = request;
Response = response;
}
/// <summary>
/// Gets the options used by the OpenID Connect server.
/// </summary>
public OpenIdConnectServerOptions Options { get; }
/// <summary>
/// Gets the logout request.
/// </summary>
public new OpenIdConnectRequest Request { get; }
/// <summary>
/// Gets the logout response.
/// </summary>
public new OpenIdConnectResponse Response { get; }
}
}
Oops, something went wrong.

0 comments on commit d95810b

Please sign in to comment.