BasicAuthenticationConfig constructor
BasicAuthenticationConfig({
- required Uri loginCredentialsAPIendpoint(),
- required Uri signupCredentialsAPIendpoint(),
- FutureOr<
AuthenticationData> customLoginResponseParser(- String response
- FutureOr<
User> ? customUserMapper()?, - Uri refreshTokenAPIendpoint(
- String refreshToken,
- JWT token
- bool debug = false,
- FutureOr<
Map< customLoginRequestMapper(String, dynamic> >- String email,
- String password,
- AuthDeviceInfo? deviceInfo
- FutureOr<
AuthenticationData> ? customSignupCredentialsResponseParser(- String body
- bool authenticateOnSignup = true,
- FutureOr<
AuthCredentialsProvider> customAutoSignupAuthClbk(- AuthSignUpPayload payload,
- AuthenticationData? authData
- Uri fetchUserInformationAPIendpoint(
- AuthenticationData data
- FutureOr<
Map< customFetchUserInformationResponseMapper()?,String, dynamic> > - bool initialAuthCheckedAfterUserFetch = true,
- bool autoLogoutOnSessionExpired = true,
- Duration? maxAge,
- FutureOr<
AuthenticationTokenParsedData> customRefreshTokenResponseParser(- String body
- void onRefreshToken(
- AuthenticationTokenParsedData tokens
- String? refreshTokenMethod,
- FutureOr<
String> customRefreshTokenRequestBodyMapper(- String refreshToken,
- String authToken,
- AuthDeviceInfo? deviceInfo
- Duration? refreshTokenTimeout,
- void onRefreshTokenFailure()?,
- required Uri deleteAccountApiEndpoint(
- String userId
- User? deleteAccountCustomResponseParser()?,
- bool logoutAfterDelete = true,
- FutureOr<
AuthenticationTokenParsedData> customRefreshTokenCallback(- String token,
- String? refreshToken,
- AuthDeviceInfo? deviceInfo
- bool provideDeviceInfo = true,
- bool customExpiredEventValidatorOnFailure(
- Object exception
Implementation
BasicAuthenticationConfig({
required this.loginCredentialsAPIendpoint,
required this.signupCredentialsAPIendpoint,
this.customLoginResponseParser,
this.customUserMapper,
this.refreshTokenAPIendpoint,
this.debug = false,
this.customLoginRequestMapper,
this.customSignupCredentialsResponseParser,
this.authenticateOnSignup = true,
this.customAutoSignupAuthClbk,
this.fetchUserInformationAPIendpoint,
this.customFetchUserInformationResponseMapper,
this.initialAuthCheckedAfterUserFetch = true,
this.autoLogoutOnSessionExpired = true,
this.maxAge,
this.customRefreshTokenResponseParser,
this.onRefreshToken,
this.refreshTokenMethod,
this.customRefreshTokenRequestBodyMapper,
this.refreshTokenTimeout,
this.onRefreshTokenFailure,
required this.deleteAccountApiEndpoint,
this.deleteAccountCustomResponseParser,
this.logoutAfterDelete = true,
this.customRefreshTokenCallback,
this.provideDeviceInfo = true,
this.customExpiredEventValidatorOnFailure,
});