Class UserAuthorizationOptions
Options for user authorization.
public class UserAuthorizationOptions
- Inheritance
-
UserAuthorizationOptions
- Inherited Members
Constructors
UserAuthorizationOptions(IConnections, params IUserAuthorization[])
public UserAuthorizationOptions(IConnections connections, params IUserAuthorization[] userAuthHandlers)
Parameters
connections
IConnectionsuserAuthHandlers
IUserAuthorization[]
UserAuthorizationOptions(IServiceProvider, IConfiguration, IStorage, AutoSignInSelectorAsync, string)
Creates UserAuthorizationOptions from IConfiguration and DI.
public UserAuthorizationOptions(IServiceProvider sp, IConfiguration configuration, IStorage storage = null, AutoSignInSelectorAsync autoSignInSelector = null, string configKey = "UserAuthorization")
Parameters
sp
IServiceProviderconfiguration
IConfigurationstorage
IStorageautoSignInSelector
AutoSignInSelectorAsyncconfigKey
string
Remarks
The "AuthSignIn" property will map to AutoSignInOn or AutoSignInOff. To provide a a custom selector, DI a AutoSignInSelectorAsync.
Fields
AutoSignInOff
public static readonly AutoSignInSelectorAsync AutoSignInOff
Field Value
AutoSignInOn
public static readonly AutoSignInSelectorAsync AutoSignInOn
Field Value
Properties
AutoSignIn
Indicates whether the Agent should start the sign in flow when the user sends a message to the Agent or triggers a message extension. If the selector returns false, the Agent will not start the sign in flow before routing the activity to the Agent logic. If the selector is not provided, the default selector returns true.
public AutoSignInSelectorAsync? AutoSignIn { get; set; }
Property Value
Remarks
Auto SignIn will use the value of DefaultHandlerName for the UserAuthorization handler to use.
DefaultHandlerName
The default user authorization handler name to use for AutoSignIn. If not specified, the first handler defined is used if Auto SignIn is enabled.
public string DefaultHandlerName { get; set; }
Property Value
SignInFailedMessage
Optional sign in failure message. This is only used if the OnUserSignInFailure(AuthorizationFailure) is not set.
public Func<string, SignInResponse, IActivity[]> SignInFailedMessage { get; set; }
Property Value
- Func<string, SignInResponse, IActivity[]>