LenraOauth2Helper constructor

LenraOauth2Helper({
  1. required String baseUri,
  2. required String redirectUri,
  3. required String clientId,
  4. required String customUriScheme,
  5. String? clientSecret,
  6. List<String> scopes = const [],
})

Creates the helper usable to refresh the OAuth2 token.

Implementation

LenraOauth2Helper({
  required this.baseUri,
  required String redirectUri,
  required String clientId,
  required String customUriScheme,
  String? clientSecret,
  List<String> scopes = const [],
}) : super(
        OAuth2Client(
            authorizeUrl: '$baseUri/oauth2/auth',
            tokenUrl: '$baseUri/oauth2/token',
            revokeUrl: '$baseUri/oauth2/revoke',
            redirectUri: redirectUri,
            customUriScheme: customUriScheme),
        grantType: OAuth2Helper.authorizationCode,
        clientId: clientId,
        clientSecret: clientSecret,
        scopes: scopes,
      );