@adonisjs/ally
Version:
Social authentication provider for AdonisJS
27 lines (26 loc) • 841 B
TypeScript
import { UrlBuilder } from '@poppinss/oauth-client';
import { LiteralStringUnion } from './types.js';
/**
* Redirect request with first class support for defining scopes.
*/
export declare class RedirectRequest<Scopes extends string> extends UrlBuilder {
#private;
constructor(baseUrl: string, scopeParamName: string, scopeSeparator: string);
/**
* Register a custom function to transform scopes. Exposed for drivers
* to implement.
*/
transformScopes(callback: (scopes: LiteralStringUnion<Scopes>[]) => string[]): this;
/**
* Define an array of scopes.
*/
scopes(scopes: LiteralStringUnion<Scopes>[]): this;
/**
* Merge to existing scopes
*/
mergeScopes(scopes: LiteralStringUnion<Scopes>[]): this;
/**
* Clear existing scopes
*/
clearScopes(): this;
}