11/**
2- * Copyright (c) {{year}} , WSO2 LLC. (https://www.wso2.com).
2+ * Copyright (c) 2025 , WSO2 LLC. (https://www.wso2.com).
33 *
44 * WSO2 LLC. licenses this file to you under the Apache License,
55 * Version 2.0 (the "License"); you may not use this file except
@@ -37,7 +37,7 @@ import {AuthURLCallback} from './models';
3737 * @class AsgardeoNodeClient
3838 */
3939export class AsgardeoNodeClient < T > {
40- private _authCore : AsgardeoNodeCore < T > ;
40+ private authCore : AsgardeoNodeCore < T > ;
4141
4242 /**
4343 * This is the constructor method that returns an instance of the `AsgardeoNodeClient` class.
@@ -60,10 +60,11 @@ export class AsgardeoNodeClient<T> {
6060 * @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#constructor
6161 * @preserve
6262 */
63+ // eslint-disable-next-line @typescript-eslint/no-empty-function
6364 constructor ( ) { }
6465
6566 public async initialize ( config : AuthClientConfig < T > , store ?: Storage ) : Promise < boolean > {
66- this . _authCore = new AsgardeoNodeCore ( config , store ) ;
67+ this . authCore = new AsgardeoNodeCore ( config , store ) ;
6768
6869 return Promise . resolve ( true ) ;
6970 }
@@ -108,7 +109,7 @@ export class AsgardeoNodeClient<T> {
108109 state ?: string ,
109110 signInConfig ?: Record < string , string | boolean > ,
110111 ) : Promise < TokenResponse > {
111- return this . _authCore . signIn ( authURLCallback , userId , authorizationCode , sessionState , state , signInConfig ) ;
112+ return this . authCore . signIn ( authURLCallback , userId , authorizationCode , sessionState , state , signInConfig ) ;
112113 }
113114
114115 /**
@@ -117,7 +118,7 @@ export class AsgardeoNodeClient<T> {
117118 * @returns {Promise<AuthClientConfig<Config>> } - A promise that resolves with the configuration data.
118119 */
119120 public async getConfigData ( ) : Promise < AuthClientConfig < T > > {
120- return this . _authCore . getConfigData ( ) ;
121+ return this . authCore . getConfigData ( ) ;
121122 }
122123
123124 /**
@@ -138,7 +139,7 @@ export class AsgardeoNodeClient<T> {
138139 *
139140 */
140141 public async signOut ( userId : string ) : Promise < string > {
141- return this . _authCore . signOut ( userId ) ;
142+ return this . authCore . signOut ( userId ) ;
142143 }
143144
144145 /**
@@ -159,7 +160,7 @@ export class AsgardeoNodeClient<T> {
159160 *
160161 */
161162 public async isSignedIn ( userId : string ) : Promise < boolean > {
162- return this . _authCore . isSignedIn ( userId ) ;
163+ return this . authCore . isSignedIn ( userId ) ;
163164 }
164165
165166 /**
@@ -180,7 +181,7 @@ export class AsgardeoNodeClient<T> {
180181 *
181182 */
182183 public async getIdToken ( userId : string ) : Promise < string > {
183- return this . _authCore . getIdToken ( userId ) ;
184+ return this . authCore . getIdToken ( userId ) ;
184185 }
185186
186187 /**
@@ -202,7 +203,7 @@ export class AsgardeoNodeClient<T> {
202203 *
203204 */
204205 public async getUser ( userId : string ) : Promise < User > {
205- return this . _authCore . getUser ( userId ) ;
206+ return this . authCore . getUser ( userId ) ;
206207 }
207208
208209 /**
@@ -221,7 +222,7 @@ export class AsgardeoNodeClient<T> {
221222 *
222223 */
223224 public async getOpenIDProviderEndpoints ( ) : Promise < OIDCEndpoints > {
224- return this . _authCore . getOpenIDProviderEndpoints ( ) ;
225+ return this . authCore . getOpenIDProviderEndpoints ( ) ;
225226 }
226227
227228 /**
@@ -243,7 +244,7 @@ export class AsgardeoNodeClient<T> {
243244 *
244245 */
245246 public async getDecodedIdToken ( userId ?: string , idToken ?: string ) : Promise < IdToken > {
246- return this . _authCore . getDecodedIdToken ( userId , idToken ) ;
247+ return this . authCore . getDecodedIdToken ( userId , idToken ) ;
247248 }
248249
249250 /**
@@ -265,7 +266,7 @@ export class AsgardeoNodeClient<T> {
265266 *
266267 */
267268 public async getAccessToken ( userId ?: string ) : Promise < string > {
268- return this . _authCore . getAccessToken ( userId ) ;
269+ return this . authCore . getAccessToken ( userId ) ;
269270 }
270271
271272 /**
@@ -309,7 +310,7 @@ export class AsgardeoNodeClient<T> {
309310 *
310311 */
311312 public async exchangeToken ( config : TokenExchangeRequestConfig , userId ?: string ) : Promise < TokenResponse | Response > {
312- return this . _authCore . exchangeToken ( config , userId ) ;
313+ return this . authCore . exchangeToken ( config , userId ) ;
313314 }
314315
315316 /**
@@ -332,11 +333,11 @@ export class AsgardeoNodeClient<T> {
332333 *
333334 */
334335 public async reInitialize ( config : Partial < AuthClientConfig < T > > ) : Promise < void > {
335- return this . _authCore . reInitialize ( config ) ;
336+ return this . authCore . reInitialize ( config ) ;
336337 }
337338
338339 public async getSignInUrl ( requestConfig ?: ExtendedAuthorizeRequestUrlParams , userId ?: string ) : Promise < string > {
339- return this . _authCore . getAuthURL ( userId , requestConfig ) ;
340+ return this . authCore . getAuthURL ( userId , requestConfig ) ;
340341 }
341342
342343 /**
@@ -357,7 +358,7 @@ export class AsgardeoNodeClient<T> {
357358 *
358359 */
359360 public async revokeAccessToken ( userId ?: string ) : Promise < Response > {
360- return this . _authCore . revokeAccessToken ( userId ) ;
361+ return this . authCore . revokeAccessToken ( userId ) ;
361362 }
362363
363364 /**
@@ -379,7 +380,7 @@ export class AsgardeoNodeClient<T> {
379380 * @memberof AsgardeoNodeClient
380381 */
381382 public refreshAccessToken ( userId ?: string ) : Promise < TokenResponse > {
382- return this . _authCore . refreshAccessToken ( userId ) ;
383+ return this . authCore . refreshAccessToken ( userId ) ;
383384 }
384385
385386 /**
@@ -425,6 +426,6 @@ export class AsgardeoNodeClient<T> {
425426 }
426427
427428 public async getStorageManager ( ) : Promise < StorageManager < T > > {
428- return this . _authCore . getStorageManager ( ) ;
429+ return this . authCore . getStorageManager ( ) ;
429430 }
430431}
0 commit comments