BasicAuthenticationConfig constructor

BasicAuthenticationConfig({
  1. required Uri loginCredentialsAPIendpoint(),
  2. required Uri signupCredentialsAPIendpoint(),
  3. FutureOr<AuthenticationData> customLoginResponseParser(
    1. String response
    )?,
  4. FutureOr<User>? customUserMapper(
    1. Map<String, dynamic> userMap
    )?,
  5. Uri refreshTokenAPIendpoint(
    1. String refreshToken,
    2. JWT token
    )?,
  6. bool debug = false,
  7. FutureOr<Map<String, dynamic>> customLoginRequestMapper(
    1. String email,
    2. String password,
    3. AuthDeviceInfo? deviceInfo
    )?,
  8. FutureOr<AuthenticationData>? customSignupCredentialsResponseParser(
    1. String body
    )?,
  9. bool authenticateOnSignup = true,
  10. FutureOr<AuthCredentialsProvider> customAutoSignupAuthClbk(
    1. AuthSignUpPayload payload,
    2. AuthenticationData? authData
    )?,
  11. Uri fetchUserInformationAPIendpoint(
    1. AuthenticationData data
    )?,
  12. FutureOr<Map<String, dynamic>> customFetchUserInformationResponseMapper(
    1. Map<String, dynamic> data
    )?,
  13. bool initialAuthCheckedAfterUserFetch = true,
  14. bool autoLogoutOnSessionExpired = true,
  15. Duration? maxAge,
  16. FutureOr<AuthenticationTokenParsedData> customRefreshTokenResponseParser(
    1. String body
    )?,
  17. void onRefreshToken(
    1. AuthenticationTokenParsedData tokens
    )?,
  18. String? refreshTokenMethod,
  19. FutureOr<String> customRefreshTokenRequestBodyMapper(
    1. String refreshToken,
    2. String authToken,
    3. AuthDeviceInfo? deviceInfo
    )?,
  20. Duration? refreshTokenTimeout,
  21. void onRefreshTokenFailure(
    1. String token,
    2. Object exception
    )?,
  22. required Uri deleteAccountApiEndpoint(
    1. String userId
    ),
  23. User? deleteAccountCustomResponseParser(
    1. Map<String, dynamic> response
    )?,
  24. bool logoutAfterDelete = true,
  25. FutureOr<AuthenticationTokenParsedData> customRefreshTokenCallback(
    1. String token,
    2. String? refreshToken,
    3. AuthDeviceInfo? deviceInfo
    )?,
  26. bool provideDeviceInfo = true,
  27. bool customExpiredEventValidatorOnFailure(
    1. 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,
});