@@ -11,53 +11,74 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
11
11
/// </summary>
12
12
public class OpenIdConnectEvents : IOpenIdConnectEvents
13
13
{
14
+ /// <summary>
15
+ /// Invoked when the authentication process completes.
16
+ /// </summary>
17
+ public Func < AuthenticationCompletedContext , Task > OnAuthenticationCompleted { get ; set ; } = context => Task . FromResult ( 0 ) ;
18
+
14
19
/// <summary>
15
20
/// Invoked if exceptions are thrown during request processing. The exceptions will be re-thrown after this event unless suppressed.
16
21
/// </summary>
17
22
public Func < AuthenticationFailedContext , Task > OnAuthenticationFailed { get ; set ; } = context => Task . FromResult ( 0 ) ;
18
23
24
+ /// <summary>
25
+ /// Invoked after the id token has passed validation and a ClaimsIdentity has been generated.
26
+ /// </summary>
27
+ public Func < AuthenticationValidatedContext , Task > OnAuthenticationValidated { get ; set ; } = context => Task . FromResult ( 0 ) ;
28
+
19
29
/// <summary>
20
30
/// Invoked after security token validation if an authorization code is present in the protocol message.
21
31
/// </summary>
22
32
public Func < AuthorizationCodeReceivedContext , Task > OnAuthorizationCodeReceived { get ; set ; } = context => Task . FromResult ( 0 ) ;
23
33
24
34
/// <summary>
25
- /// Invoked after " authorization code" is redeemed for tokens at the token endpoint .
35
+ /// Invoked when an authorization response is received .
26
36
/// </summary>
27
- public Func < AuthorizationCodeRedeemedContext , Task > OnAuthorizationCodeRedeemed { get ; set ; } = context => Task . FromResult ( 0 ) ;
37
+ public Func < AuthorizationResponseReceivedContext , Task > OnAuthorizationResponseReceived { get ; set ; } = context => Task . FromResult ( 0 ) ;
28
38
29
39
/// <summary>
30
40
/// Invoked when a protocol message is first received.
31
41
/// </summary>
32
42
public Func < MessageReceivedContext , Task > OnMessageReceived { get ; set ; } = context => Task . FromResult ( 0 ) ;
33
43
34
44
/// <summary>
35
- /// Invoked to manipulate redirects to the identity provider for SignIn, SignOut, or Challenge .
45
+ /// Invoked before redirecting to the identity provider to authenticate .
36
46
/// </summary>
37
- public Func < RedirectToIdentityProviderContext , Task > OnRedirectToIdentityProvider { get ; set ; } = context => Task . FromResult ( 0 ) ;
47
+ public Func < RedirectContext , Task > OnRedirectToAuthenticationEndpoint { get ; set ; } = context => Task . FromResult ( 0 ) ;
38
48
39
49
/// <summary>
40
- /// Invoked with the security token that has been extracted from the protocol message .
50
+ /// Invoked before redirecting to the identity provider to sign out .
41
51
/// </summary>
42
- public Func < SecurityTokenReceivedContext , Task > OnSecurityTokenReceived { get ; set ; } = context => Task . FromResult ( 0 ) ;
52
+ public Func < RedirectContext , Task > OnRedirectToEndSessionEndpoint { get ; set ; } = context => Task . FromResult ( 0 ) ;
43
53
44
54
/// <summary>
45
- /// Invoked after the security token has passed validation and a ClaimsIdentity has been generated.
55
+ /// Invoked after "authorization code" is redeemed for tokens at the token endpoint.
56
+ /// </summary>
57
+ public Func < TokenResponseReceivedContext , Task > OnTokenResponseReceived { get ; set ; } = context => Task . FromResult ( 0 ) ;
58
+
59
+ /// <summary>
60
+ /// Invoked when user information is retrieved from the UserInfoEndpoint.
46
61
/// </summary>
47
- public Func < SecurityTokenValidatedContext , Task > OnSecurityTokenValidated { get ; set ; } = context => Task . FromResult ( 0 ) ;
62
+ public Func < UserInformationReceivedContext , Task > OnUserInformationReceived { get ; set ; } = context => Task . FromResult ( 0 ) ;
63
+
64
+ public virtual Task AuthenticationCompleted ( AuthenticationCompletedContext context ) => OnAuthenticationCompleted ( context ) ;
48
65
49
66
public virtual Task AuthenticationFailed ( AuthenticationFailedContext context ) => OnAuthenticationFailed ( context ) ;
50
67
68
+ public virtual Task AuthenticationValidated ( AuthenticationValidatedContext context ) => OnAuthenticationValidated ( context ) ;
69
+
51
70
public virtual Task AuthorizationCodeReceived ( AuthorizationCodeReceivedContext context ) => OnAuthorizationCodeReceived ( context ) ;
52
71
53
- public virtual Task AuthorizationCodeRedeemed ( AuthorizationCodeRedeemedContext context ) => OnAuthorizationCodeRedeemed ( context ) ;
72
+ public virtual Task AuthorizationResponseReceived ( AuthorizationResponseReceivedContext context ) => OnAuthorizationResponseReceived ( context ) ;
54
73
55
74
public virtual Task MessageReceived ( MessageReceivedContext context ) => OnMessageReceived ( context ) ;
56
75
57
- public virtual Task RedirectToIdentityProvider ( RedirectToIdentityProviderContext context ) => OnRedirectToIdentityProvider ( context ) ;
76
+ public virtual Task RedirectToAuthenticationEndpoint ( RedirectContext context ) => OnRedirectToAuthenticationEndpoint ( context ) ;
77
+
78
+ public virtual Task RedirectToEndSessionEndpoint ( RedirectContext context ) => OnRedirectToEndSessionEndpoint ( context ) ;
58
79
59
- public virtual Task SecurityTokenReceived ( SecurityTokenReceivedContext context ) => OnSecurityTokenReceived ( context ) ;
80
+ public virtual Task TokenResponseReceived ( TokenResponseReceivedContext context ) => OnTokenResponseReceived ( context ) ;
60
81
61
- public virtual Task SecurityTokenValidated ( SecurityTokenValidatedContext context ) => OnSecurityTokenValidated ( context ) ;
82
+ public virtual Task UserInformationReceived ( UserInformationReceivedContext context ) => OnUserInformationReceived ( context ) ;
62
83
}
63
84
}
0 commit comments