Skip to content

Commit 0e2d7dd

Browse files
committed
chore: standardize clientID to clientId across documentation and codebase
1 parent bbba841 commit 0e2d7dd

35 files changed

Lines changed: 76 additions & 76 deletions

File tree

docs/src/react/components/asgardeo-provider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { AsgardeoProvider } from "@asgardeo/react";
4040

4141
- `signInRedirectURL`: The URL where users should be redirected after they sign in. This should be a page in your application.
4242

43-
- `clientID`: The ID of your application. You get this when you register your application with Asgardeo.
43+
- `clientId`: The ID of your application. You get this when you register your application with Asgardeo.
4444

4545
- `scope`: The scope of the access request. This is a list of scopes separated by spaces. Scopes allow your application to request access only to the resources it needs, and also allow users to control how much access they grant to your application.
4646

docs/src/react/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Then, wrap your application with the `AsgardeoProvider` and pass the basic confi
7171
<AsgardeoProvider
7272
config={{
7373
baseUrl: "https://api.asgardeo.io/t/org_name",
74-
clientID: "gqtroUbA1Qsulqr*****",
74+
clientId: "gqtroUbA1Qsulqr*****",
7575
scope: ["openid", "internal_login", "profile"],
7676
signInRedirectURL: "https://domain_name:8080",
7777
}}>

packages/__legacy__/core/src/api/sign-out.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const signOut = async (): Promise<void> => {
5050

5151
try {
5252
formBody.append('id_token_hint', await authClient.getIDToken());
53-
formBody.append('client_id', (await authClient.getStorageManager().getConfigData()).clientID);
53+
formBody.append('client_id', (await authClient.getStorageManager().getConfigData()).clientId);
5454
formBody.append('response_mode', 'direct');
5555
} catch (error) {
5656
throw new AsgardeoUIException('JS_UI_CORE-SIGNOUT-SO-IV', 'Failed to build the body of the signout request.');

packages/__legacy__/react/src/utils/crypto-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ export default class SPACryptoUtils implements Crypto<Buffer | string> {
7070
idToken: string,
7171
jwk: Partial<JWKInterface>,
7272
algorithms: string[],
73-
clientID: string,
73+
clientId: string,
7474
issuer: string,
7575
subject: string,
7676
clockTolerance?: number,
7777
validateJwtIssuer?: boolean,
7878
): Promise<boolean> {
7979
const jwtVerifyOptions: JwtVerifyOptions = {
8080
algorithms,
81-
audience: clientID,
81+
audience: clientId,
8282
clockTolerance,
8383
issuer,
8484
subject,

packages/browser/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { AsgardeoAuthClient } from "@asgardeo/browser";
2929
// Initialize the auth client
3030
const authClient = new AsgardeoAuthClient({
3131
signInRedirectURL: "https://localhost:3000",
32-
clientID: "<your_client_id>",
32+
clientId: "<your_client_id>",
3333
baseUrl: "https://api.asgardeo.io/t/<org_name>"
3434
});
3535

packages/browser/src/__legacy__/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export class AsgardeoSPAClient {
218218
* ```
219219
* auth.initialize({
220220
* signInRedirectURL: "http://localhost:3000/sign-in",
221-
* clientID: "client ID",
221+
* clientId: "client ID",
222222
* baseUrl: "https://api.asgardeo.io"
223223
* });
224224
* ```
@@ -1145,7 +1145,7 @@ export class AsgardeoSPAClient {
11451145
* ```
11461146
* const config = {
11471147
* signInRedirectURL: "http://localhost:3000/sign-in",
1148-
* clientID: "client ID",
1148+
* clientId: "client ID",
11491149
* baseUrl: "https://api.asgardeo.io"
11501150
* }
11511151
* const auth.updateConfig(config);

packages/browser/src/__legacy__/clients/main-thread-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export const MainThreadClient = async (
259259
if ((await _authenticationClient.isAuthenticated()) && !_getSignOutURLFromSessionStorage) {
260260
location.href = await _authenticationClient.getSignOutURL();
261261
} else {
262-
location.href = SPAUtils.getSignOutURL(config.clientID, instanceID);
262+
location.href = SPAUtils.getSignOutURL(config.clientId, instanceID);
263263
}
264264

265265
_spaHelper.clearRefreshTokenTimeout();

packages/browser/src/__legacy__/clients/web-worker-client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const WebWorkerClient = async (
129129

130130
return signOutURL;
131131
} catch {
132-
return SPAUtils.getSignOutURL(config.clientID, instanceID);
132+
return SPAUtils.getSignOutURL(config.clientId, instanceID);
133133
}
134134
},
135135
config.storage as BrowserStorage,
@@ -504,7 +504,7 @@ export const WebWorkerClient = async (
504504

505505
return communicate<null, string>(message)
506506
.then((url: string) => {
507-
SPAUtils.setSignOutURL(url, config.clientID, instanceID);
507+
SPAUtils.setSignOutURL(url, config.clientId, instanceID);
508508

509509
// Enable OIDC Sessions Management only if it is set to true in the config.
510510
if (config.enableOIDCSessionManagement) {
@@ -636,7 +636,7 @@ export const WebWorkerClient = async (
636636
return reject(error);
637637
});
638638
} else {
639-
window.location.href = SPAUtils.getSignOutURL(config.clientID, instanceID);
639+
window.location.href = SPAUtils.getSignOutURL(config.clientId, instanceID);
640640

641641
return SPAUtils.waitTillPageRedirect().then(() => {
642642
return Promise.resolve(true);

packages/browser/src/__legacy__/helpers/authentication-helper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class AuthenticationHelper<T extends MainThreadClientConfig | WebWorkerCl
9090
sessionManagementHelper: SessionManagementHelperInterface,
9191
): void {
9292
sessionManagementHelper.initialize(
93-
config.clientID,
93+
config.clientId,
9494
oidcEndpoints.checkSessionIframe ?? '',
9595
getSessionState,
9696
config.checkSessionInterval ?? 3,
@@ -473,7 +473,7 @@ export class AuthenticationHelper<T extends MainThreadClientConfig | WebWorkerCl
473473
SPAUtils.setSignOutURL(await _authenticationClient.getSignOutURL());
474474
} */
475475
if (config.storage !== BrowserStorage.WebWorker) {
476-
SPAUtils.setSignOutURL(await this._authenticationClient.getSignOutURL(), config.clientID, this._instanceID);
476+
SPAUtils.setSignOutURL(await this._authenticationClient.getSignOutURL(), config.clientId, this._instanceID);
477477

478478
if (this._spaHelper) {
479479
this._spaHelper.clearRefreshTokenTimeout();

packages/browser/src/__legacy__/helpers/session-management-helper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ export const SessionManagementHelper = (() => {
4848
let _getAuthorizationURL: (params?: ExtendedAuthorizeRequestUrlParams) => Promise<string>;
4949

5050
const initialize = (
51-
clientID: string,
51+
clientId: string,
5252
checkSessionEndpoint: string,
5353
getSessionState: () => Promise<string>,
5454
interval: number,
5555
sessionRefreshInterval: number,
5656
redirectURL: string,
5757
getAuthorizationURL: (params?: ExtendedAuthorizeRequestUrlParams) => Promise<string>,
5858
): void => {
59-
_clientID = clientID;
59+
_clientID = clientId;
6060
_checkSessionEndpoint = checkSessionEndpoint;
6161
_sessionState = getSessionState;
6262
_interval = interval;

0 commit comments

Comments
 (0)