C# Class Tailspin.Surveys.Web.Security.SurveyAuthenticationEvents

Inheritance: Microsoft.AspNet.Authentication.OpenIdConnect.OpenIdConnectEvents
Show file Open project: Azure-Samples/guidance-identity-management-for-multitenant-apps

Public Methods

Method Description
AuthenticationFailed ( Microsoft.AspNet.Authentication.OpenIdConnect.AuthenticationFailedContext context ) : System.Threading.Tasks.Task

Called by the OIDC middleware when authentication fails.

AuthenticationValidated ( Microsoft.AspNet.Authentication.OpenIdConnect.AuthenticationValidatedContext context ) : System.Threading.Tasks.Task

Method that is called by the OIDC middleware after the authentication data has been validated. This is where most of the sign up and sign in work is done.

AuthorizationCodeReceived ( Microsoft.AspNet.Authentication.OpenIdConnect.AuthorizationCodeReceivedContext context ) : System.Threading.Tasks.Task
AuthorizationResponseReceived ( Microsoft.AspNet.Authentication.OpenIdConnect.AuthorizationResponseReceivedContext context ) : System.Threading.Tasks.Task
MessageReceived ( Microsoft.AspNet.Authentication.OpenIdConnect.MessageReceivedContext context ) : System.Threading.Tasks.Task
RedirectToAuthenticationEndpoint ( Microsoft.AspNet.Authentication.OpenIdConnect.RedirectContext context ) : System.Threading.Tasks.Task

Called prior to the OIDC middleware redirecting to the authentication endpoint. In the event we are signing up a tenant, we need to put the "admin_consent" value for the prompt query string parameter. AAD uses this to show the admin consent flow.

RedirectToEndSessionEndpoint ( Microsoft.AspNet.Authentication.OpenIdConnect.RedirectContext context ) : System.Threading.Tasks.Task
RemoteError ( Microsoft.AspNet.Authentication.ErrorContext context ) : System.Threading.Tasks.Task
SurveyAuthenticationEvents ( AzureAdOptions adOptions, ILoggerFactory loggerFactory ) : System

Initializes a new instance of Tailspin.Surveys.Web.Security.SurveyAuthenticationEvents.

TicketReceived ( Microsoft.AspNet.Authentication.TicketReceivedContext context ) : System.Threading.Tasks.Task
TokenResponseReceived ( Microsoft.AspNet.Authentication.OpenIdConnect.TokenResponseReceivedContext context ) : System.Threading.Tasks.Task
UserInformationReceived ( Microsoft.AspNet.Authentication.OpenIdConnect.UserInformationReceivedContext context ) : System.Threading.Tasks.Task

Private Methods

Method Description
CreateOrUpdateUserAsync ( Microsoft.AspNet.Authentication.AuthenticationTicket authenticationTicket, UserManager userManager, Tenant tenant ) : System.Threading.Tasks.Task
NormalizeClaims ( ClaimsPrincipal principal ) : void

Transforms the claims from AAD to well-known claims.

SignUpTenantAsync ( Microsoft.AspNet.Authentication.BaseControlContext context, TenantManager tenantManager ) : Task

Method Details

AuthenticationFailed() public method

Called by the OIDC middleware when authentication fails.
public AuthenticationFailed ( Microsoft.AspNet.Authentication.OpenIdConnect.AuthenticationFailedContext context ) : System.Threading.Tasks.Task
context Microsoft.AspNet.Authentication.OpenIdConnect.AuthenticationFailedContext An OIDC-middleware supplied containing information about the failed authentication.
return System.Threading.Tasks.Task

AuthenticationValidated() public method

Method that is called by the OIDC middleware after the authentication data has been validated. This is where most of the sign up and sign in work is done.
public AuthenticationValidated ( Microsoft.AspNet.Authentication.OpenIdConnect.AuthenticationValidatedContext context ) : System.Threading.Tasks.Task
context Microsoft.AspNet.Authentication.OpenIdConnect.AuthenticationValidatedContext An OIDC-supplied containing the current authentication information.
return System.Threading.Tasks.Task

AuthorizationCodeReceived() public method

public AuthorizationCodeReceived ( Microsoft.AspNet.Authentication.OpenIdConnect.AuthorizationCodeReceivedContext context ) : System.Threading.Tasks.Task
context Microsoft.AspNet.Authentication.OpenIdConnect.AuthorizationCodeReceivedContext
return System.Threading.Tasks.Task

AuthorizationResponseReceived() public method

public AuthorizationResponseReceived ( Microsoft.AspNet.Authentication.OpenIdConnect.AuthorizationResponseReceivedContext context ) : System.Threading.Tasks.Task
context Microsoft.AspNet.Authentication.OpenIdConnect.AuthorizationResponseReceivedContext
return System.Threading.Tasks.Task

MessageReceived() public method

public MessageReceived ( Microsoft.AspNet.Authentication.OpenIdConnect.MessageReceivedContext context ) : System.Threading.Tasks.Task
context Microsoft.AspNet.Authentication.OpenIdConnect.MessageReceivedContext
return System.Threading.Tasks.Task

RedirectToAuthenticationEndpoint() public method

Called prior to the OIDC middleware redirecting to the authentication endpoint. In the event we are signing up a tenant, we need to put the "admin_consent" value for the prompt query string parameter. AAD uses this to show the admin consent flow.
public RedirectToAuthenticationEndpoint ( Microsoft.AspNet.Authentication.OpenIdConnect.RedirectContext context ) : System.Threading.Tasks.Task
context Microsoft.AspNet.Authentication.OpenIdConnect.RedirectContext The for this event.
return System.Threading.Tasks.Task

RedirectToEndSessionEndpoint() public method

public RedirectToEndSessionEndpoint ( Microsoft.AspNet.Authentication.OpenIdConnect.RedirectContext context ) : System.Threading.Tasks.Task
context Microsoft.AspNet.Authentication.OpenIdConnect.RedirectContext
return System.Threading.Tasks.Task

RemoteError() public method

public RemoteError ( Microsoft.AspNet.Authentication.ErrorContext context ) : System.Threading.Tasks.Task
context Microsoft.AspNet.Authentication.ErrorContext
return System.Threading.Tasks.Task

SurveyAuthenticationEvents() public method

Initializes a new instance of Tailspin.Surveys.Web.Security.SurveyAuthenticationEvents.
public SurveyAuthenticationEvents ( AzureAdOptions adOptions, ILoggerFactory loggerFactory ) : System
adOptions Tailspin.Surveys.Common.Configuration.AzureAdOptions Application settings related to Azure Active Directory.
loggerFactory ILoggerFactory used to create type-specific instances.
return System

TicketReceived() public method

public TicketReceived ( Microsoft.AspNet.Authentication.TicketReceivedContext context ) : System.Threading.Tasks.Task
context Microsoft.AspNet.Authentication.TicketReceivedContext
return System.Threading.Tasks.Task

TokenResponseReceived() public method

public TokenResponseReceived ( Microsoft.AspNet.Authentication.OpenIdConnect.TokenResponseReceivedContext context ) : System.Threading.Tasks.Task
context Microsoft.AspNet.Authentication.OpenIdConnect.TokenResponseReceivedContext
return System.Threading.Tasks.Task

UserInformationReceived() public method

public UserInformationReceived ( Microsoft.AspNet.Authentication.OpenIdConnect.UserInformationReceivedContext context ) : System.Threading.Tasks.Task
context Microsoft.AspNet.Authentication.OpenIdConnect.UserInformationReceivedContext
return System.Threading.Tasks.Task