@@ -37,62 +37,62 @@ public AuthenticationManager(AuthenticationOptions<TState> options)
37
37
}
38
38
39
39
/// <summary>
40
- /// Sign in a user
40
+ /// Sign in a user.
41
41
/// </summary>
42
42
/// <param name="context">The turn context</param>
43
43
/// <param name="state">The turn state</param>
44
- /// <param name="handlerName ">Optional. The name of the authentication handler to use. If not specified, the default handler name is used.</param>
44
+ /// <param name="settingName ">Optional. The name of the authentication handler to use. If not specified, the default handler name is used.</param>
45
45
/// <param name="cancellationToken">The cancellation token</param>
46
46
/// <returns>The sign in response</returns>
47
- public async Task < SignInResponse > SignUserInAsync ( ITurnContext context , TState state , string ? handlerName = null , CancellationToken cancellationToken = default )
47
+ public async Task < SignInResponse > SignUserInAsync ( ITurnContext context , TState state , string ? settingName = null , CancellationToken cancellationToken = default )
48
48
{
49
- if ( handlerName == null )
49
+ if ( settingName == null )
50
50
{
51
- handlerName = Default ;
51
+ settingName = Default ;
52
52
}
53
53
54
- IAuthentication < TState > auth = Get ( handlerName ) ;
54
+ IAuthentication < TState > auth = Get ( settingName ) ;
55
55
SignInResponse response = await auth . SignInUserAsync ( context , state , cancellationToken ) ;
56
56
if ( response . Status == SignInStatus . Complete )
57
57
{
58
- AuthUtilities . SetTokenInState ( state , handlerName , response . Token ! ) ;
58
+ AuthUtilities . SetTokenInState ( state , settingName , response . Token ! ) ;
59
59
}
60
60
return response ;
61
61
}
62
62
63
63
/// <summary>
64
- /// Signs out a user
64
+ /// Signs out a user.
65
65
/// </summary>
66
66
/// <param name="context">The turn context</param>
67
67
/// <param name="state">The turn state</param>
68
- /// <param name="handlerName ">Optional. The name of the authentication handler to use. If not specified, the default handler name is used.</param>
68
+ /// <param name="settingName ">Optional. The name of the authentication handler to use. If not specified, the default handler name is used.</param>
69
69
/// <param name="cancellationToken">The cancellation token</param>
70
- public async Task SignOutUserAsync ( ITurnContext context , TState state , string ? handlerName = null , CancellationToken cancellationToken = default )
70
+ public async Task SignOutUserAsync ( ITurnContext context , TState state , string ? settingName = null , CancellationToken cancellationToken = default )
71
71
{
72
- if ( handlerName == null )
72
+ if ( settingName == null )
73
73
{
74
- handlerName = Default ;
74
+ settingName = Default ;
75
75
}
76
76
77
- IAuthentication < TState > auth = Get ( handlerName ) ;
77
+ IAuthentication < TState > auth = Get ( settingName ) ;
78
78
await auth . SignOutUserAsync ( context , state , cancellationToken ) ;
79
- AuthUtilities . DeleteTokenFromState ( state , handlerName ) ;
79
+ AuthUtilities . DeleteTokenFromState ( state , settingName ) ;
80
80
}
81
81
82
82
/// <summary>
83
83
/// Check whether current activity supports authentication.
84
84
/// </summary>
85
85
/// <param name="context">Current turn context.</param>
86
- /// <param name="handlerName ">Optional. The name of the authentication handler to use. If not specified, the default handler name is used.</param>
86
+ /// <param name="settingName ">Optional. The name of the authentication handler to use. If not specified, the default handler name is used.</param>
87
87
/// <returns>True if current activity supports authentication. Otherwise, false.</returns>
88
- public async Task < bool > IsValidActivityAsync ( ITurnContext context , string ? handlerName = null )
88
+ public async Task < bool > IsValidActivityAsync ( ITurnContext context , string ? settingName = null )
89
89
{
90
- if ( handlerName == null )
90
+ if ( settingName == null )
91
91
{
92
- handlerName = Default ;
92
+ settingName = Default ;
93
93
}
94
94
95
- IAuthentication < TState > auth = Get ( handlerName ) ;
95
+ IAuthentication < TState > auth = Get ( settingName ) ;
96
96
return await auth . IsValidActivityAsync ( context ) ;
97
97
}
98
98
0 commit comments