@betha-plataforma/oauth
Version:
Biblioteca JavaScript para lidar com o fluxo do OAuth 2.0 em aplicações Web, com suporte a TypeScript.
20 lines (19 loc) • 613 B
TypeScript
import { OAuthConfig } from '../../OAuthConfig';
import { UserInfoResponse } from './UserInfoResponse';
/**
* The `userinfo` endpoint of the OpenID specification.
*
* {@link https://openid.net/specs/openid-connect-core-1_0.html}
*/
export declare class UserInfo {
private readonly config;
constructor(config: OAuthConfig);
/**
* Calls the `userinfo` endpoint and returns the user's details.
*
* @method get
* @param {IntrospectParams} params the request params.
* @returns the `userinfo` URL
*/
readonly get: (accessToken: string) => Promise<UserInfoResponse>;
}