Skip to content

Commit

Permalink
Merge pull request #20 from veracity/bugfix/metadata-url-not-used
Browse files Browse the repository at this point in the history
Bugfix/metadata url not used
  • Loading branch information
rudfoss committed Oct 7, 2019
2 parents 9c64498 + be97b6d commit 006c20e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ session|IMakeSessionConfigObjectOptions|Session configuration
strategy|IVIDPWebAppStrategySettings|Configuration for the strategy you want to use.
loginPath?|string|The path where login will be configured
logoutPath?|string|The path where logout will be configured
onBeforeLogin?|(req: Request & {veracityAuthState?: any}, res: Response, next: NextFunction) => void|Provide a function that executes before the login process starts. It executes as a middleware so remember to call next() when you are done.
onVerify?|VIDPWebAppStrategyVerifier|The verifier function passed to the strategy. If not defined will be a passthrough verifier that stores everything from the strategy on `req.user`.
onLoginComplete?|(req: Request & {veracityAuthState?: any}, res: Response, next: NextFunction) => void,|A route handler to execute once the login is completed. The default will route the user to the returnTo query parameter path or to the root path.
onLogout?|(req: Request & {veracityAuthState?: any}, res: Response, next: NextFunction) => void,|A route handler to execute once the user tries to log out. The default handler will call `req.logout()` and redirect to the default Veracity central logout endpoint.
onLoginError?|(error: VIDPError, req: Request, res: Response, next: NextFunction) => void|An error handler that is called if an error response is received from the Veracity IDP authentication redirect. If not defined will pass the error on to the default error handler in the app or router.
onBeforeLogin?|(req: Request & {veracityAuthState?: any}, res: Response, next: NextFunction) => void|Provide a function that executes before the login process starts.<br>It executes as a middleware so remember to call next() when you are done.
onVerify?|VIDPWebAppStrategyVerifier|The verifier function passed to the strategy.<br>If not defined will be a passthrough verifier that stores everything from the strategy on `req.user`.
onLoginComplete?|(req: Request & {veracityAuthState?: any}, res: Response, next: NextFunction) => void,|A route handler to execute once the login is completed.<br>The default will route the user to the returnTo query parameter path or to the root path.
onLogout?|(req: Request & {veracityAuthState?: any}, res: Response, next: NextFunction) => void,|A route handler to execute once the user tries to log out.<br>The default handler will call `req.logout()` and redirect to the default Veracity central logout endpoint.
onLoginError?|(error: VIDPError, req: Request, res: Response, next: NextFunction) => void|An error handler that is called if an error response is received from the Veracity IDP authentication redirect.<br>If not defined will pass the error on to the default error handler in the app or router.

### IVIDPAccessTokenPayload
*extends IVIDPJWTTokenPayloadCommonClaims*
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@veracity/node-auth",
"version": "1.0.3",
"version": "1.0.4",
"description": "A library for authenticating with Veracity and retrieving one or more access tokens for communicating with APIs.",
"scripts": {
"build:copy-files": "ts-node -T scripts/copy-files.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/api/VIDPWebAppStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class VIDPWebAppStrategy<TUser = any> implements Strategy {

public async authenticate(req: Request, options?: any) {
try {
const metadata = await getVIDPMetadata()
const metadata = await getVIDPMetadata(this.settings.metadataURL)
const context = new VIDPOpenIDContext(req, {
apiScopes: this.settings.apiScopes,
authParams: this.authParams,
Expand Down

0 comments on commit 006c20e

Please sign in to comment.