@asgardeo/vue 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -70,6 +70,12 @@ declare class AuthAPI {
70
70
  * @return {Promise<BasicUserInfo>} a promise that resolves with the user information.
71
71
  */
72
72
  getBasicUserInfo(): Promise<BasicUserInfo>;
73
+ /**
74
+ * This method returns a Promise that resolves with the basic user information obtained from the ID token.
75
+ *
76
+ * @return {Promise<BasicUserInfo>} a promise that resolves with the user information.
77
+ */
78
+ getUser(): Promise<BasicUserInfo>;
73
79
  /**
74
80
  * This method sends an API request to a protected endpoint.
75
81
  * The access token is automatically attached to the header of the request.
@@ -23,26 +23,26 @@ export declare const mockState: AuthStateInterface;
23
23
  export type MockAuthAPI = {
24
24
  disableHttpHandler: Mock;
25
25
  enableHttpHandler: Mock;
26
+ exchangeToken: Mock;
26
27
  getAccessToken: Mock;
27
- getUser: Mock;
28
28
  getDecodedIdToken: Mock;
29
29
  getHttpClient: Mock;
30
30
  getIdToken: Mock;
31
31
  getOpenIDProviderEndpoints: Mock;
32
32
  getState: Mock;
33
+ getUser: Mock;
33
34
  httpRequest: Mock;
34
35
  httpRequestAll: Mock;
35
36
  init: Mock;
36
- isSignedIn: Mock;
37
37
  isSessionActive: Mock;
38
+ isSignedIn: Mock;
38
39
  on: Mock;
40
+ reInitialize: Mock;
39
41
  refreshAccessToken: Mock;
40
- exchangeToken: Mock;
41
42
  revokeAccessToken: Mock;
42
43
  signIn: Mock;
43
- signOut: Mock;
44
44
  signInSilently: Mock;
45
- reInitialize: Mock;
45
+ signOut: Mock;
46
46
  updateState: Mock;
47
47
  };
48
48
  export declare const mockAuthAPI: MockAuthAPI;
@@ -51,14 +51,14 @@ export interface AuthStateInterface {
51
51
  * The email address of the user.
52
52
  */
53
53
  email?: string;
54
- /**
55
- * Specifies if the user is authenticated or not.
56
- */
57
- isSignedIn: boolean;
58
54
  /**
59
55
  * Are the Auth requests loading.
60
56
  */
61
57
  isLoading: boolean;
58
+ /**
59
+ * Specifies if the user is authenticated or not.
60
+ */
61
+ isSignedIn: boolean;
62
62
  /**
63
63
  * The uid corresponding to the user who the ID token belonged to.
64
64
  */
@@ -72,30 +72,30 @@ export interface AuthContextInterface {
72
72
  disableHttpHandler(): Promise<boolean>;
73
73
  enableHttpHandler(): Promise<boolean>;
74
74
  error: AsgardeoAuthException;
75
+ exchangeToken(config: TokenExchangeRequestConfig, callback?: (response: BasicUserInfo | Response) => void): void;
75
76
  getAccessToken(): Promise<string>;
76
- getUser(): Promise<BasicUserInfo>;
77
77
  getDecodedIdToken(): Promise<IdToken>;
78
78
  getHttpClient(): Promise<HttpClientInstance>;
79
79
  getIdToken(): Promise<string>;
80
80
  getOpenIDProviderEndpoints(): Promise<OIDCEndpoints>;
81
+ getUser(): Promise<BasicUserInfo>;
81
82
  httpRequest(config: HttpRequestConfig): Promise<HttpResponse<any>>;
82
83
  httpRequestAll(configs: HttpRequestConfig[]): Promise<HttpResponse<any>[]>;
83
84
  isSignedIn(): Promise<boolean>;
84
85
  on(hook: Hooks.CustomGrant, callback: (response?: any) => void, id: string): void;
85
86
  on(hook: Exclude<Hooks, Hooks.CustomGrant>, callback: (response?: any) => void): void;
86
87
  on(hook: Hooks, callback: (response?: any) => void, id?: string): void;
88
+ reInitialize(config: Partial<AuthClientConfig<Config>>): Promise<void>;
87
89
  refreshAccessToken(): Promise<BasicUserInfo>;
88
- exchangeToken(config: TokenExchangeRequestConfig, callback?: (response: BasicUserInfo | Response) => void): void;
89
90
  revokeAccessToken(): Promise<boolean>;
90
91
  signIn: (config?: SignInConfig, authorizationCode?: string, sessionState?: string, state?: string, callback?: (response: BasicUserInfo) => void, tokenRequestConfig?: {
91
92
  params: Record<string, unknown>;
92
93
  }) => Promise<BasicUserInfo>;
93
- signOut: (callback?: (response: boolean) => void) => Promise<boolean>;
94
- state: AuthStateInterface;
95
94
  signInSilently: (additionalParams?: Record<string, string | boolean>, tokenRequestConfig?: {
96
95
  params: Record<string, unknown>;
97
96
  }) => Promise<boolean | BasicUserInfo>;
98
- reInitialize(config: Partial<AuthClientConfig<Config>>): Promise<void>;
97
+ signOut: (callback?: (response: boolean) => void) => Promise<boolean>;
98
+ state: AuthStateInterface;
99
99
  }
100
100
  /**
101
101
  * The model of the object returned by the `getAuthParams` prop method of the `AuthProvider`.