mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 09:01:45 +08:00
Updated interface name
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import * as angular from 'angular';
|
||||
|
||||
angular.module('angular-oauth2-test', ['angular-oauth2'])
|
||||
.config(['OAuthProvider', function(OAuthProvider:angular.oauth2.IOAuthProvider){
|
||||
.config(['OAuthProvider', function(OAuthProvider:angular.oauth2.OAuthProvider){
|
||||
OAuthProvider.configure({
|
||||
baseUrl: 'https://api.website.com',
|
||||
clientId: 'CLIENT_ID',
|
||||
|
||||
28
angular-oauth2/index.d.ts
vendored
28
angular-oauth2/index.d.ts
vendored
@@ -6,10 +6,8 @@
|
||||
import * as angular from 'angular';
|
||||
|
||||
declare module 'angular' {
|
||||
|
||||
export namespace oauth2 {
|
||||
|
||||
interface IOAuthConfig {
|
||||
export namespace oauth2 {
|
||||
interface OAuthConfig {
|
||||
baseUrl: string;
|
||||
clientId: string;
|
||||
clientSecret?: string;
|
||||
@@ -17,33 +15,33 @@ declare module 'angular' {
|
||||
revokePath?: string;
|
||||
}
|
||||
|
||||
interface IOAuthProvider {
|
||||
configure(params: IOAuthConfig): IOAuthConfig;
|
||||
interface OAuthProvider {
|
||||
configure(params: OAuthConfig): OAuthConfig;
|
||||
}
|
||||
|
||||
interface IData {
|
||||
interface Data {
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
interface IOAuth {
|
||||
interface OAuth {
|
||||
isAuthenticated(): boolean;
|
||||
getAccessToken(data: IData, options?: any): angular.IPromise<string>;
|
||||
getRefreshToken(data?: IData, options?: any): angular.IPromise<string>;
|
||||
revokeToken(data?: IData, options?: any): angular.IPromise<string>;
|
||||
getAccessToken(data: Data, options?: any): angular.IPromise<string>;
|
||||
getRefreshToken(data?: Data, options?: any): angular.IPromise<string>;
|
||||
revokeToken(data?: Data, options?: any): angular.IPromise<string>;
|
||||
}
|
||||
|
||||
interface IOAuthTokenConfig {
|
||||
interface OAuthTokenConfig {
|
||||
name: string;
|
||||
options: any;
|
||||
}
|
||||
|
||||
interface IOAuthTokenOptions {
|
||||
interface OAuthTokenOptions {
|
||||
secure: boolean;
|
||||
}
|
||||
|
||||
interface IOAuthTokenProvider {
|
||||
configure(params: IOAuthTokenConfig): IOAuthTokenConfig;
|
||||
interface OAuthTokenProvider {
|
||||
configure(params: OAuthTokenConfig): OAuthTokenConfig;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user