@@ -78,6 +78,13 @@ public virtual Task SignInAsync(string authenticationScheme, ClaimsPrincipal pri
78
78
return SignInAsync ( authenticationScheme , principal , properties : null ) ;
79
79
}
80
80
81
+ /// <summary>
82
+ /// Creates a challenge for the authentication manager with <see cref="ChallengeBehavior.Forbidden"/>.
83
+ /// </summary>
84
+ /// <returns>A <see cref="Task"/> that represents the asynchronous challenge operation.</returns>
85
+ public virtual Task ForbidAsync ( )
86
+ => ForbidAsync ( AutomaticScheme , properties : null ) ;
87
+
81
88
public virtual Task ForbidAsync ( string authenticationScheme )
82
89
{
83
90
if ( authenticationScheme == null )
@@ -99,6 +106,14 @@ public virtual Task ForbidAsync(string authenticationScheme, AuthenticationPrope
99
106
return ChallengeAsync ( authenticationScheme , properties , ChallengeBehavior . Forbidden ) ;
100
107
}
101
108
109
+ /// <summary>
110
+ /// Creates a challenge for the authentication manager with <see cref="ChallengeBehavior.Forbidden"/>.
111
+ /// </summary>
112
+ /// <param name="properties">Additional arbitrary values which may be used by particular authentication types.</param>
113
+ /// <returns>A <see cref="Task"/> that represents the asynchronous challenge operation.</returns>
114
+ public virtual Task ForbidAsync ( AuthenticationProperties properties )
115
+ => ForbidAsync ( AutomaticScheme , properties ) ;
116
+
102
117
public abstract Task ChallengeAsync ( string authenticationScheme , AuthenticationProperties properties , ChallengeBehavior behavior ) ;
103
118
104
119
public abstract Task SignInAsync ( string authenticationScheme , ClaimsPrincipal principal , AuthenticationProperties properties ) ;
0 commit comments