Merge pull request #29529 from backstage/renovate/davidzemon-passport-okta-oauth-0.x
fix(deps): update dependency @davidzemon/passport-okta-oauth to ^0.0.6
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend-module-okta-provider': patch
|
||||
---
|
||||
|
||||
Updated dependency `@davidzemon/passport-okta-oauth` to `^0.0.6`.
|
||||
@@ -36,7 +36,7 @@
|
||||
"dependencies": {
|
||||
"@backstage/backend-plugin-api": "workspace:^",
|
||||
"@backstage/plugin-auth-node": "workspace:^",
|
||||
"@davidzemon/passport-okta-oauth": "^0.0.5",
|
||||
"@davidzemon/passport-okta-oauth": "^0.0.6",
|
||||
"express": "^4.18.2",
|
||||
"passport": "^0.7.0",
|
||||
"zod": "^3.22.4"
|
||||
|
||||
@@ -23,3 +23,87 @@ declare module 'passport-okta2' {
|
||||
authenticate(this: StrategyCreated<this>, req: Request, options?: any): any;
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE(freben): This entire block is here because version 0.0.6 of this library
|
||||
// accidentally didn't include types. It did, however, include a scope fix that
|
||||
// is interesting for Backstage to get in.
|
||||
// See https://github.com/backstage/backstage/pull/29529
|
||||
// See https://github.com/DavidZemon/passport-okta-oauth/pull/1
|
||||
declare module '@davidzemon/passport-okta-oauth' {
|
||||
import OAuth2Strategy = require('passport-oauth2');
|
||||
|
||||
type OktaStrategyOptions = UniqueOktaStrategyOptions &
|
||||
Omit<
|
||||
import('passport-oauth2')._StrategyOptionsBase,
|
||||
'authorizationURL' | 'tokenURL'
|
||||
>;
|
||||
type UniqueOktaStrategyOptions = {
|
||||
/**
|
||||
* audience is the Okta Domain, e.g. `https://example.okta.com`,
|
||||
* `https://example.oktapreview.com`
|
||||
*/
|
||||
audience: string;
|
||||
/**
|
||||
* authServerID is the authorization server ID. If it is defined, the token
|
||||
* URL might be something like `https://example.okta.com/oauth2/authServerID/v1/token`
|
||||
*/
|
||||
authServerID: string | undefined;
|
||||
/**
|
||||
* idp is the Identity Provider (id). This is an optional field. it's a 20 character
|
||||
* alphanumeric string, e.g. `qOp8aaJmCEhvep5Il6ZJ` (generated example)
|
||||
*/
|
||||
idp: string | undefined;
|
||||
/**
|
||||
* With this option enabled, `req` will be passed as the first argument to the
|
||||
* verify callback.
|
||||
*/
|
||||
passReqToCallback: boolean | undefined;
|
||||
/**
|
||||
* Set this to 'code'
|
||||
*/
|
||||
response_type: 'code';
|
||||
};
|
||||
|
||||
class Strategy extends OAuth2Strategy {
|
||||
/**
|
||||
* @param {OktaStrategyOptions | undefined} options
|
||||
* @param {import("passport-oauth2").VerifyFunction | import("passport-oauth2").VerifyFunctionWithRequest} verify
|
||||
*/
|
||||
constructor(
|
||||
options: OktaStrategyOptions | undefined,
|
||||
verify:
|
||||
| import('passport-oauth2').VerifyFunction
|
||||
| import('passport-oauth2').VerifyFunctionWithRequest,
|
||||
);
|
||||
_userInfoUrl: string;
|
||||
_idp: string;
|
||||
_state: any;
|
||||
/**
|
||||
* Retrieve user profile from Okta.
|
||||
* Further references at http://developer.okta.com/docs/api/resources/oidc.html#get-user-information
|
||||
*
|
||||
* This function constructs a normalized profile, with the following properties:
|
||||
*
|
||||
* - `provider` always set to `okta`
|
||||
* - `id`
|
||||
* - `username`
|
||||
* - `displayName`
|
||||
*
|
||||
* @param {String} accessToken
|
||||
* @param {Function} done
|
||||
* @api protected
|
||||
*/
|
||||
userProfile(accessToken: string, done: Function): void;
|
||||
/**
|
||||
* Return extra Okta-specific parameters to be included in the authorization
|
||||
* request.
|
||||
*
|
||||
* @param {Object} option
|
||||
* @return {Object}
|
||||
* @api protected
|
||||
*/
|
||||
authorizationParams(option: any): any;
|
||||
}
|
||||
|
||||
export { Strategy };
|
||||
}
|
||||
|
||||
@@ -5455,7 +5455,7 @@ __metadata:
|
||||
"@backstage/plugin-auth-backend": "workspace:^"
|
||||
"@backstage/plugin-auth-node": "workspace:^"
|
||||
"@backstage/types": "workspace:^"
|
||||
"@davidzemon/passport-okta-oauth": "npm:^0.0.5"
|
||||
"@davidzemon/passport-okta-oauth": "npm:^0.0.6"
|
||||
express: "npm:^4.18.2"
|
||||
passport: "npm:^0.7.0"
|
||||
supertest: "npm:^7.0.0"
|
||||
@@ -9427,15 +9427,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@davidzemon/passport-okta-oauth@npm:^0.0.5":
|
||||
version: 0.0.5
|
||||
resolution: "@davidzemon/passport-okta-oauth@npm:0.0.5"
|
||||
"@davidzemon/passport-okta-oauth@npm:^0.0.6":
|
||||
version: 0.0.6
|
||||
resolution: "@davidzemon/passport-okta-oauth@npm:0.0.6"
|
||||
dependencies:
|
||||
"@types/passport-oauth2": "npm:^1.4.11"
|
||||
passport-oauth2: "npm:^1.6.1"
|
||||
pkginfo: "npm:^0.4.1"
|
||||
uid2: "npm:^1.0.0"
|
||||
checksum: 10/6932aca4213f1e47c41454cbb9ef1309643ffa14fa3da401f18e397e76f3fa1669be76d96db65dd6435854d7f05b30d3a27f645d10e3c6ed955ad30930d47b3e
|
||||
checksum: 10/d29a26459ff387d7507c031a6814e3581eb47e2dc9dda6848667362973455cd125e2a251b30ad6c093dfd6cd8ee7adf48301f395808b212008a6ee702a507354
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user