@types/angular-oauth2
TypeScript icon, indicating that this package has built-in type declarations

4.1.8 • Public • Published

Installation

npm install --save @types/angular-oauth2

Summary

This package contains type definitions for angular-oauth2 (https://github.com/oauthjs/angular-oauth2).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/angular-oauth2.

index.d.ts

import * as angular from "angular";

declare module "angular" {
    namespace oauth2 {
        interface OAuthConfig {
            baseUrl: string;
            clientId: string;
            clientSecret?: string | undefined;
            grantPath?: string | undefined;
            revokePath?: string | undefined;
        }

        interface OAuthProvider {
            configure(params: OAuthConfig): OAuthConfig;
        }

        interface Data {
            username: string;
            password: string;
        }

        interface OAuth {
            isAuthenticated(): boolean;
            getAccessToken(data: Data, options?: any): IPromise<string>;
            getRefreshToken(data?: Data, options?: any): IPromise<string>;
            revokeToken(data?: Data, options?: any): IPromise<string>;
        }

        interface OAuthTokenConfig {
            name: string;
            options: any;
        }

        interface OAuthTokenOptions {
            secure: boolean;
        }

        interface OAuthTokenProvider {
            configure(params: OAuthTokenConfig): OAuthTokenConfig;
        }
    }
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:04 GMT
  • Dependencies: @types/angular

Credits

These definitions were written by Antério Vieira.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/angular-oauth2

Weekly Downloads

23

Version

4.1.8

License

MIT

Unpacked Size

4.93 kB

Total Files

5

Last publish

Collaborators

  • types