mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
added auth strategies form + add ability to disable strategies
This commit is contained in:
@@ -342,8 +342,7 @@ export class Authenticator<Strategies extends Record<string, Strategy> = Record<
|
||||
toJSON(secrets?: boolean) {
|
||||
return {
|
||||
...this.config,
|
||||
jwt: secrets ? this.config.jwt : undefined,
|
||||
strategies: transformObject(this.getStrategies(), (s) => s.toJSON(secrets))
|
||||
jwt: secrets ? this.config.jwt : undefined
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,9 +147,6 @@ export class PasswordStrategy implements Strategy {
|
||||
}
|
||||
|
||||
toJSON(secrets?: boolean) {
|
||||
return {
|
||||
type: this.getType(),
|
||||
config: secrets ? this.options : undefined
|
||||
};
|
||||
return secrets ? this.options : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -476,11 +476,8 @@ export class OAuthStrategy implements Strategy {
|
||||
const config = secrets ? this.config : filterKeys(this.config, ["secret", "client_id"]);
|
||||
|
||||
return {
|
||||
type: this.getType(),
|
||||
config: {
|
||||
type: this.getIssuerConfig().type,
|
||||
...config
|
||||
}
|
||||
type: this.getIssuerConfig().type,
|
||||
...config
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user