mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-19 05:03:32 +08:00
Merge pull request #9933 from spzSource/master
[adal-angular]: add the new field postLogoutRedirectUri & appropriate tests & code style fix
This commit is contained in:
@@ -20,4 +20,6 @@ Logging.level = 4;
|
||||
|
||||
auth.info("Logging message");
|
||||
|
||||
var userName: string = auth.getCachedUser().userName;
|
||||
var userName: string = auth.getCachedUser().userName;
|
||||
var postLogoutRedirectUrl = auth.config.postLogoutRedirectUri;
|
||||
var isValidRequest = auth.getRequestInfo('hash').valid;
|
||||
44
adal-angular/adal.d.ts
vendored
44
adal-angular/adal.d.ts
vendored
@@ -13,29 +13,30 @@ declare module 'adal' {
|
||||
declare namespace adal {
|
||||
|
||||
interface Config {
|
||||
tenant?: string,
|
||||
clientId: string,
|
||||
redirectUri?: string,
|
||||
cacheLocation?: string,
|
||||
displayCall?: (urlNavigate: string) => any,
|
||||
correlationId?: string,
|
||||
loginResource?: string,
|
||||
resource?: string
|
||||
endpoints?: any // If you need to send CORS api requests.
|
||||
extraQueryParameter?: string
|
||||
tenant?: string;
|
||||
clientId: string;
|
||||
redirectUri?: string;
|
||||
cacheLocation?: string;
|
||||
displayCall?: (urlNavigate: string) => any;
|
||||
correlationId?: string;
|
||||
loginResource?: string;
|
||||
resource?: string;
|
||||
endpoints?: any; // If you need to send CORS api requests.
|
||||
extraQueryParameter?: string;
|
||||
postLogoutRedirectUri?: string; // redirect url after succesful logout operation
|
||||
}
|
||||
|
||||
interface User {
|
||||
userName: string,
|
||||
profile: any
|
||||
userName: string;
|
||||
profile: any;
|
||||
}
|
||||
|
||||
interface RequestInfo {
|
||||
valid: boolean,
|
||||
parameters: any,
|
||||
stateMatch: boolean,
|
||||
stateResponse: string,
|
||||
requestType: string
|
||||
valid: boolean;
|
||||
parameters: any;
|
||||
stateMatch: boolean;
|
||||
stateResponse: string;
|
||||
requestType: string;
|
||||
}
|
||||
|
||||
interface Logging {
|
||||
@@ -64,6 +65,10 @@ declare namespace adal {
|
||||
* Saves the resulting Idtoken in localStorage.
|
||||
*/
|
||||
login(): void;
|
||||
|
||||
/**
|
||||
* Indicates whether login is in progress now or not.
|
||||
*/
|
||||
loginInProgress(): boolean;
|
||||
|
||||
/**
|
||||
@@ -147,6 +152,11 @@ declare namespace adal {
|
||||
*/
|
||||
getResourceForEndpoint(endpoint: string): string;
|
||||
|
||||
/**
|
||||
* Handles redirection after login operation.
|
||||
* Gets access token from url and saves token to the (local/session) storage
|
||||
* or saves error in case unsuccessful login.
|
||||
*/
|
||||
handleWindowCallback(): void;
|
||||
|
||||
log(level: number, message: string, error: any): void;
|
||||
|
||||
Reference in New Issue
Block a user