angel3_auth library

Classes

AngelAuth<User>
Handles authentication within an Angel application.
AngelAuthOptions<User>
AuthStrategy<User>
A function that handles login and signup for an Angel application.
AuthToken
ExternalAuthOptions
A common class containing parsing and validation logic for third-party authentication configuration.
LocalAuthStrategy<User>

Functions

confirmPopupAuthentication({String eventName = 'token'}) AngelAuthCallback
Displays a default callback page to confirm authentication via popups.
decodeBase64(String str) String
Calls BASE64URL, but also works for strings with lengths that are not multiples of 4.
forceBasicAuth<User>({String? realm}) → RequestHandler
Forces Basic authentication over the requested resource, with the given realm name, if no JWT is present.
requireAuthentication<User>() → RequestHandler
Restricts access to a resource via authentication.

Typedefs

AngelAuthCallback = FutureOr Function(RequestContext req, ResponseContext res, String token)
AngelAuthTokenCallback<User> = FutureOr Function(RequestContext req, ResponseContext res, AuthToken token, User user)
LocalAuthVerifier<User> = FutureOr<User?> Function(String? username, String? password)
Determines the validity of an incoming username and password.