Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring the SDK to use the logger utility from Auth Node SDK. #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import {
DecodedIDTokenPayload,
CustomGrantConfig,
FetchResponse,
AsgardeoAuthException
AsgardeoAuthException,
Logger
} from "@asgardeo/auth-node";
import { CookieConfig, DEFAULT_LOGIN_PATH, DEFAULT_LOGOUT_PATH } from "./constants";
import { ExpressClientConfig, UnauthenticatedCallback } from "./models";
import { Logger } from "./utils/logger-util";
import express from "express";
import { v4 as uuidv4 } from "uuid";
import { asgardeoExpressAuth, protectRoute } from "./middleware";
Expand Down
3 changes: 1 addition & 2 deletions lib/src/middleware/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
* under the License.
*/

import { AsgardeoAuthException, Store, TokenResponse } from "@asgardeo/auth-node";
import { AsgardeoAuthException, Store, TokenResponse, Logger } from "@asgardeo/auth-node";
import express from "express";
import { AsgardeoExpressClient } from "../client";
import { DEFAULT_LOGIN_PATH, DEFAULT_LOGOUT_PATH } from "../constants";
import { ExpressClientConfig } from "../models";
import { Logger } from "../utils/logger-util";

export const asgardeoExpressAuth = (
asgardeoExpressClient: AsgardeoExpressClient,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/middleware/protect-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import express from "express";
import { AsgardeoExpressClient } from "../client";
import { UnauthenticatedCallback } from "../models";
import { Logger } from "../utils/logger-util";
import { Logger } from "@asgardeo/auth-node";

export const protectRoute = (
asgardeoExpressClient: AsgardeoExpressClient,
Expand Down
66 changes: 0 additions & 66 deletions lib/src/utils/logger-util.ts

This file was deleted.