MsalGuard class
Create a new MsalGuard widget @param publicWidget The widget to display when user is not authenticated @param guardedWidget The widget to display when user is authenticated @param loadingWidget the widget to display when transitioning between states and authenticating @param clientId the client id of the client applciation in Azure AD @param scopes The default scopes to be used on the app against its main API endpoint. Default scopes used for login and checking auth status @param authority The authority url to authenticate against @param redirectUri the redirect uri @param androidRedirectUri redirect uri override for android @param iosRedirectUri redirect uri override for iOS @param apiBaseUrl The base url of the api against which authenticated calls will be made. Used for authenticated_http service to allow calling paths.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MsalGuard
Constructors
-
MsalGuard({Key? key, required Widget publicWidget, required Widget guardedWidget, required Widget loadingWidget, required String clientId, required List<
String> scopes, required String authority, List<String> ? additionalAuthorities, String? redirectUri, String? androidRedirectUri, String? iosRedirectUri, String? keychain, bool? privateSession, String? apiBaseUrl, List<Interceptor> ? httpInterceptors}) -
const
Properties
-
additionalAuthorities
→ List<
String> ? -
final
- androidRedirectUri → String?
-
final
- apiBaseUrl → String?
-
final
-
final
- clientId → String
-
final
- guardedWidget → Widget
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
httpInterceptors
→ List<
Interceptor> ? -
final
- iosRedirectUri → String?
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keychain → String?
-
this is only used in ios it won't affect android configuration
for more info go to https://docs.microsoft.com/en-us/azure/active-directory/develop/single-sign-on-macos-ios#silent-sso-between-apps
final
- loadingWidget → Widget
-
final
- privateSession → bool?
-
privateSession is set to true to request that the browser doesn’t share cookies or other browsing data between the authentication session and the user’s normal browser session. Whether the request is honored depends on the user’s default web browser. Safari always honors the request.
The value of this property is false by default.
final
- publicWidget → Widget
-
final
- redirectUri → String?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scopes
→ List<
String> -
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< MsalGuard> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited