import { IOAuth2ProviderSettings, IOpenIDToken, IOpenIDConfiguration, IOAuth2AuthCodeParams, IOAuth2RefreshTokenParams, OAuth2ProviderInitInfo, OAuth2Provider } from './oauth-provider';
/**
 */
export interface IGiteaAuthSettings extends IOAuth2ProviderSettings {
    /** 'openid', 'email', 'profile' and additional scopes you want to access. */
    scopes?: string[];
    host: string;
    protocol: string;
}
interface IGiteaAuthToken {
    access_token: string;
    expires_in: number;
    expires: Date;
    id_token: IOpenIDToken;
    refresh_token: string;
    scope: string;
    token_type: string;
}
export declare class GiteaAuthProvider extends OAuth2Provider {
    _config: IOpenIDConfiguration;
    constructor(settings: IGiteaAuthSettings);
    getOpenIDConfig(): Promise<IOpenIDConfiguration>;
    /**
     * Starts auth flow by getting the url the user should be redirected to
     * @param info.redirectUrl Url spotify will redirect to after authorizing, should be the url
     * @param info.state Optional state that will be passed to redirectUri by spotify
     */
    init(info: OAuth2ProviderInitInfo): Promise<string>;
    getAccessToken(params: IOAuth2AuthCodeParams | IOAuth2RefreshTokenParams): Promise<IGiteaAuthToken>;
    getUserInfo(access_token: string): Promise<{
        id: string;
        name: string;
        username: string;
        display_name: string;
        picture: {
            url: string;
        }[];
        email: string;
        email_verified: boolean;
        other: {};
    }>;
}
export declare const AuthProvider: typeof GiteaAuthProvider;
export {};
//# sourceMappingURL=gitea.d.ts.map