authenticate abstract method

Future<AngelAuthResult> authenticate({
  1. required String type,
  2. dynamic credentials,
  3. String authEndpoint = '/auth',
  4. @deprecated String reviveEndpoint = '/auth/token',
})

Authenticates against the server.

This is designed with package:angel_auth in mind.

The type is appended to the authEndpoint, ex. local becomes /auth/local.

The given credentials are sent to server as-is; the request body is sent as JSON.

Implementation

Future<AngelAuthResult> authenticate(
    {required String type,
    credentials,
    String authEndpoint = '/auth',
    @deprecated String reviveEndpoint = '/auth/token'});