providers/microsoft library
This library contains the Microsoft authentication provider for the Serverpod Idp module.
Classes
- AuthSuccess
- Response model representing a successful authentication result with all relevant authentication information.
- MicrosoftAccount
- A fully configured Microsoft account to be used for logins.
- MicrosoftIdp
- Main class for the Microsoft identity provider. The methods defined here are intended to be called from an endpoint.
- MicrosoftIdpAdmin
- Collection of Microsoft-account admin methods.
- MicrosoftIdpBaseEndpoint
- Base endpoint for Microsoft Account-based authentication.
- MicrosoftIdpConfig
- Configuration for the Microsoft identity provider.
- MicrosoftIdpConfigFromPasswords
-
Creates a new MicrosoftIdpConfig from keys on the
passwords.yamlfile. - MicrosoftIdpUtils
- Utility functions for the Microsoft identity provider.
Extensions
- MicrosoftIdpGetter on AuthServices
- Extension to get the MicrosoftIdp instance from the AuthServices.
Typedefs
-
GetExtraMicrosoftInfoCallback
= Future<
void> Function(Session session, {required String accessToken, required MicrosoftAccountDetails accountDetails, required Transaction? transaction}) -
Function to be called to extract additional information from Microsoft APIs
using the access token. The
sessionandtransactioncan be used to store additional information in the database. - MicrosoftAccountDetails = ({String? email, Uint8List? imageBytes, String? name, String userIdentifier})
- Details of the Microsoft Account.
- MicrosoftAccountDetailsValidation = void Function(MicrosoftAccountDetails accountDetails)
- Function to be called to check whether a Microsoft account details match the requirements during registration.
-
MicrosoftAuthSuccess
= ({UuidValue authUserId, MicrosoftAccountDetails details, UuidValue microsoftAccountId, bool newAccount, Set<
Scope> scopes}) - Result of a successful authentication using Microsoft as identity provider.
Exceptions / Errors
- MicrosoftAccessTokenVerificationException
- Exception to be thrown if the Microsoft access token verification fails.
- MicrosoftUserInfoMissingDataException
- Exception thrown when the user info from Microsoft is missing required data.