Слияние кода завершено, страница обновится автоматически
declare class OAuthErrorResponse {
constructor(response: {
error: string;
state: string;
error_description: string;
});
error: string;
state: string;
error_description: string;
getMessage(): string;
}
declare class RefreshRequest {
constructor(config: {
refresh_token: string;
scope: string;
});
refresh_token: string;
scope: string;
}
declare interface IOAuthRequest {
response_type: string;
scope: string;
metadata: object;
}
declare class OAuthRequest implements IOAuthRequest {
response_type: string;
scope: string;
metadata: object;
constructor(config: IOAuthRequest);
}
declare interface IOAuthImplicitRequest extends IOAuthRequest {
client_id: string;
redirect_uri: string;
state: string;
}
declare class OAuthImplicitRequest extends OAuthRequest implements IOAuthImplicitRequest {
client_id: string;
redirect_uri: string;
state: string;
constructor(config: IOAuthImplicitRequest);
}
declare interface IOAuthResponse {
access_token: string;
token_type: string;
refresh_token: string;
expires_in: number;
scope: string;
}
declare class OAuthResponse implements IOAuthResponse {
access_token: string;
token_type: string;
refresh_token: string;
expires_in: number;
scope: string;
constructor(response: IOAuthResponse);
}
declare interface IOAuthImplicitResponse extends IOAuthResponse {
state: string;
}
declare class OAuthImplicitResponse extends OAuthResponse implements IOAuthImplicitResponse {
state: string;
constructor(response: IOAuthImplicitResponse);
}
declare class OAuthTokenStorage {
constructor();
get(key: string): string;
set(key: string, val: string): void;
remove(key: string): void;
_empty(): void;
_purge(): void;
}
declare class MemoryTokenStorage extends OAuthTokenStorage {
items: {
[key: string]: string;
}
}
declare class LocalTokenStorage extends OAuthTokenStorage {
constructor(prefix: string, localStorage: WindowLocalStorage);
localStorage: WindowLocalStorage;
prefix: string;
}
declare interface IProvider {
id: string;
authorization_url: string;
storage: WindowLocalStorage;
}
declare class Provider implements IProvider {
id: string;
authorization_url: string;
storage: WindowLocalStorage;
constructor(config: IProvider);
auth_url_has_query: boolean;
deleteTokens(): void;
remember(request: OAuthImplicitRequest): void | boolean;
forget(request: OAuthImplicitRequest): void;
isExpected(response: OAuthImplicitResponse): boolean;
hasAccessToken(): boolean;
getAccessToken(): string;
setAccessToken(token: string): void;
hasRefreshToken(): boolean;
getRefreshToken(): boolean;
setRefreshToken(token: string): void;
encodeInUri(request: OAuthRequest): string;
requestToken(request: OAuthRequest): string;
refreshToken(): string | boolean;
decodeFromUri(fragment: string): OAuthErrorResponse | OAuthImplicitResponse;
handleRefresh(response: OAuthResponse): void;
handleResponse(response: OAuthImplicitResponse): OAuthErrorResponse | OAuthImplicitResponse;
parse(fragment: string): Error | OAuthErrorResponse | OAuthImplicitResponse;
}
export {
Provider,
OAuthImplicitResponse as Response,
OAuthImplicitRequest as Request,
OAuthErrorResponse as Error,
MemoryTokenStorage as MemoryStorage,
}
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )