|
| 1 | +import { Request } from "express"; |
| 2 | +import GoogleOidcStrategy from "passport-google-oidc"; |
| 3 | +import { Profile, VerifyCallback } from "passport-openidconnect"; |
| 4 | + |
| 5 | +const opts: GoogleOidcStrategy.StrategyOptions = { |
| 6 | + clientID: "dummy", |
| 7 | + clientSecret: "secret", |
| 8 | + callbackURL: "https://example.com/callback", |
| 9 | +}; |
| 10 | + |
| 11 | +function testVerifyFunc3(i: string, p: Profile, cb: VerifyCallback) { |
| 12 | + cb(new Error("Not implemented")); |
| 13 | +} |
| 14 | + |
| 15 | +function testVerifyFunc4(i: string, p: Profile, ctx: object, cb: VerifyCallback) { |
| 16 | + cb(new Error("Not Implemented")); |
| 17 | +} |
| 18 | +function testVerifyFunc5(i: string, p: Profile, ctx: object, _idToken: string | object, cb: VerifyCallback) { |
| 19 | + cb(new Error("Not implemented")); |
| 20 | +} |
| 21 | + |
| 22 | +function testVerifyFunc7( |
| 23 | + i: string, |
| 24 | + p: Profile, |
| 25 | + ctx: object, |
| 26 | + _idToken: string | object, |
| 27 | + _accessToken: string | object, |
| 28 | + _refreshToken: string | object, |
| 29 | + cb: VerifyCallback, |
| 30 | +) { |
| 31 | + cb(new Error("Not implemented")); |
| 32 | +} |
| 33 | + |
| 34 | +function testVerifyFunc8( |
| 35 | + i: string, |
| 36 | + p: Profile, |
| 37 | + ctx: object, |
| 38 | + _idToken: string | object, |
| 39 | + _accessToken: string | object, |
| 40 | + _refreshToken: string | object, |
| 41 | + _params: any, |
| 42 | + cb: VerifyCallback, |
| 43 | +) { |
| 44 | + cb(new Error("Not implemented")); |
| 45 | +} |
| 46 | + |
| 47 | +function testVerifyFunc9( |
| 48 | + i: string, |
| 49 | + uiProfile: object, |
| 50 | + idProfile: object, |
| 51 | + ctx: object, |
| 52 | + _idToken: string | object, |
| 53 | + _accessToken: string | object, |
| 54 | + _refreshToken: string | object, |
| 55 | + _params: any, |
| 56 | + cb: VerifyCallback, |
| 57 | +) { |
| 58 | + cb(new Error("Not implemented")); |
| 59 | +} |
| 60 | + |
| 61 | +function testVerifyFuncReq4(r: Request, i: string, p: Profile, cb: VerifyCallback) { |
| 62 | + cb(new Error("Not implemented")); |
| 63 | +} |
| 64 | + |
| 65 | +function testVerifyFuncReq5(r: Request, i: string, p: Profile, ctx: object, cb: VerifyCallback) { |
| 66 | + cb(new Error("Not Implemented")); |
| 67 | +} |
| 68 | +function testVerifyFuncReq6( |
| 69 | + r: Request, |
| 70 | + i: string, |
| 71 | + p: Profile, |
| 72 | + ctx: object, |
| 73 | + _idToken: string | object, |
| 74 | + cb: VerifyCallback, |
| 75 | +) { |
| 76 | + cb(new Error("Not implemented")); |
| 77 | +} |
| 78 | + |
| 79 | +function testVerifyFuncReq8( |
| 80 | + r: Request, |
| 81 | + i: string, |
| 82 | + p: Profile, |
| 83 | + ctx: object, |
| 84 | + _idToken: string | object, |
| 85 | + _accessToken: string | object, |
| 86 | + _refreshToken: string | object, |
| 87 | + cb: VerifyCallback, |
| 88 | +) { |
| 89 | + cb(new Error("Not implemented")); |
| 90 | +} |
| 91 | + |
| 92 | +function testVerifyFuncReq9( |
| 93 | + r: Request, |
| 94 | + i: string, |
| 95 | + p: Profile, |
| 96 | + ctx: object, |
| 97 | + _idToken: string | object, |
| 98 | + _accessToken: string | object, |
| 99 | + _refreshToken: string | object, |
| 100 | + _params: any, |
| 101 | + cb: VerifyCallback, |
| 102 | +) { |
| 103 | + cb(new Error("Not implemented")); |
| 104 | +} |
| 105 | + |
| 106 | +function testVerifyFuncReq10( |
| 107 | + r: Request, |
| 108 | + i: string, |
| 109 | + uiProfile: object, |
| 110 | + idProfile: object, |
| 111 | + ctx: object, |
| 112 | + _idToken: string | object, |
| 113 | + _accessToken: string | object, |
| 114 | + _refreshToken: string | object, |
| 115 | + _params: any, |
| 116 | + cb: VerifyCallback, |
| 117 | +) { |
| 118 | + cb(new Error("Not implemented")); |
| 119 | +} |
| 120 | + |
| 121 | +let strat: GoogleOidcStrategy = new GoogleOidcStrategy(opts, testVerifyFunc3); |
| 122 | +strat = new GoogleOidcStrategy(opts, testVerifyFunc4); |
| 123 | +strat = new GoogleOidcStrategy(opts, testVerifyFunc5); |
| 124 | +strat = new GoogleOidcStrategy(opts, testVerifyFunc7); |
| 125 | +strat = new GoogleOidcStrategy(opts, testVerifyFunc8); |
| 126 | +strat = new GoogleOidcStrategy(opts, testVerifyFunc9); |
| 127 | +strat = new GoogleOidcStrategy(opts, testVerifyFuncReq4); |
| 128 | +strat = new GoogleOidcStrategy(opts, testVerifyFuncReq5); |
| 129 | +strat = new GoogleOidcStrategy(opts, testVerifyFuncReq6); |
| 130 | +strat = new GoogleOidcStrategy(opts, testVerifyFuncReq8); |
| 131 | +strat = new GoogleOidcStrategy(opts, testVerifyFuncReq9); |
| 132 | +strat = new GoogleOidcStrategy(opts, testVerifyFuncReq10); |
0 commit comments