Skip to content

Commit da379a0

Browse files
committed
Merge branch 'master' into authinfo-assignprop
2 parents 7047316 + cfdbd4a commit da379a0

27 files changed

+1658
-322
lines changed

.github/workflows/node.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version:
20+
- '17'
21+
- '16'
22+
- '14'
23+
- '12'
24+
- '10'
25+
- '8'
26+
- '6'
27+
- '4'
28+
# - '3' # io.js
29+
# - '2' # io.js
30+
# - '1' # io.js
31+
- '0.12'
32+
- '0.10'
33+
# - '0.8'
34+
35+
steps:
36+
- uses: actions/checkout@v2
37+
- name: Use Node.js ${{ matrix.node-version }}
38+
uses: actions/setup-node@v2
39+
with:
40+
node-version: ${{ matrix.node-version }}
41+
- run: npm install
42+
- run: npm test

CHANGELOG.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
## [0.6.0] - 2022-05-20
10+
### Added
11+
- `authenticate()`, `req#login`, and `req#logout` accept a
12+
`keepSessionInfo: true` option to keep session information after regenerating
13+
the session.
14+
15+
### Changed
16+
17+
- `req#login()` and `req#logout()` regenerate the the session and clear session
18+
information by default.
19+
- `req#logout()` is now an asynchronous function and requires a callback
20+
function as the last argument.
21+
22+
### Security
23+
24+
- Improved robustness against session fixation attacks in cases where there is
25+
physical access to the same system or the application is susceptible to
26+
cross-site scripting (XSS).
27+
28+
## [0.5.3] - 2022-05-16
29+
### Fixed
30+
31+
- `initialize()` middleware extends request with `login()`, `logIn()`,
32+
`logout()`, `logOut()`, `isAuthenticated()`, and `isUnauthenticated()` functions
33+
again, reverting change from 0.5.1.
34+
35+
## [0.5.2] - 2021-12-16
36+
### Fixed
37+
- Introduced a compatibility layer for strategies that depend directly on
38+
`[email protected]` or earlier (such as `passport-azure-ad`), which were
39+
broken by the removal of private variables in `[email protected]`.
40+
41+
## [0.5.1] - 2021-12-15
42+
### Added
43+
- Informative error message in session strategy if session support is not
44+
available.
45+
46+
### Changed
47+
48+
- `authenticate()` middleware, rather than `initialize()` middleware, extends
49+
request with `login()`, `logIn()`, `logout()`, `logOut()`, `isAuthenticated()`,
50+
and `isUnauthenticated()` functions.
51+
52+
## [0.5.0] - 2021-09-23
53+
### Changed
54+
55+
- `initialize()` middleware extends request with `login()`, `logIn()`,
56+
`logout()`, `logOut()`, `isAuthenticated()`, and `isUnauthenticated()`
57+
functions.
58+
59+
### Removed
60+
61+
- `login()`, `logIn()`, `logout()`, `logOut()`, `isAuthenticated()`, and
62+
`isUnauthenticated()` functions no longer added to `http.IncomingMessage.prototype`.
63+
64+
### Fixed
65+
66+
- `userProperty` option to `initialize()` middleware only affects the current
67+
request, rather than all requests processed via singleton Passport instance,
68+
eliminating a race condition in situations where `initialize()` middleware is
69+
used multiple times in an application with `userProperty` set to different
70+
values.
71+
72+
[Unreleased]: https://github.com/jaredhanson/passport/compare/v0.6.0...HEAD
73+
[0.6.0]: https://github.com/jaredhanson/passport/compare/v0.5.3...v0.6.0
74+
[0.5.3]: https://github.com/jaredhanson/passport/compare/v0.5.2...v0.5.3
75+
[0.5.2]: https://github.com/jaredhanson/passport/compare/v0.5.1...v0.5.2
76+
[0.5.1]: https://github.com/jaredhanson/passport/compare/v0.5.0...v0.5.1

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2011-2019 Jared Hanson
3+
Copyright (c) 2011-2021 Jared Hanson
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@ clean: clean-docs clean-cov
2121
clobber: clean
2222
-rm -r node_modules
2323

24+
html:
25+
jsdoc -c etc/jsdoc.json -d ./doc $(SOURCES)
26+
2427

2528
.PHONY: clean clobber

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,22 @@ hooks for controlling what occurs when authentication succeeds or fails.
1717
<p align="center">
1818
<sup>Sponsors</sup>
1919
<br>
20-
<a href="https://www.loginradius.com/?utm_source=sponsership&utm_medium=github&utm_campaign=jaredhanson"><img src="https://raw.githubusercontent.com/jaredhanson/passport/master/sponsors/loginradius.png"></a><br/>
21-
<a href="https://accounts.loginradius.com/auth.aspx?action=register?utm_source=sponsership&utm_medium=github&utm_campaign=jaredhanson">LoginRadius</a> is built for the developer community to integrate robust Authentication and Single Sign-On in just a few lines of code.<br/><a href="https://accounts.loginradius.com/auth.aspx?action=register?utm_source=sponsership&utm_medium=github&utm_campaign=jaredhanson">FREE Signup</a>
22-
<br><br>
2320
<a href="https://workos.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=passport_js&utm_source=github"><img src="https://raw.githubusercontent.com/jaredhanson/passport/master/sponsors/workos.png"></a><br/>
2421
<a href="https://workos.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=passport_js&utm_source=github"><b>Your app, enterprise-ready.</b><br/>Start selling to enterprise customers with just a few lines of code. Add Single Sign-On (and more) in minutes instead of months.</a>
22+
<br>
23+
<br>
24+
<a href="https://www.descope.com/?utm_source=PassportJS&utm_medium=referral&utm_campaign=oss-sponsorship">
25+
<picture>
26+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/jaredhanson/passport/master/sponsors/descope-dark.svg">
27+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/jaredhanson/passport/master/sponsors/descope.svg">
28+
<img src="https://raw.githubusercontent.com/jaredhanson/passport/master/sponsors/descope.svg" width="275">
29+
</picture>
30+
</a><br/>
31+
<a href="https://www.descope.com/?utm_source=PassportJS&utm_medium=referral&utm_campaign=oss-sponsorship"><b>Drag and drop your auth</b><br/>Add authentication and user management to your consumer and business apps with a few lines of code.</a>
32+
<br>
33+
<br>
34+
<a href="https://fusionauth.io/?utm_source=passportjs&utm_medium=referral&utm_campaign=sponsorship"><img src="https://raw.githubusercontent.com/jaredhanson/passport/master/sponsors/fusionauth.png" width="275"></a><br/>
35+
<a href="https://fusionauth.io/?utm_source=passportjs&utm_medium=referral&utm_campaign=sponsorship"><b>Auth. Built for Devs, by Devs</b><br/>Add login, registration, SSO, MFA, and a bazillion other features to your app in minutes. Integrates with any codebase and installs on any server, anywhere in the world.</a>
2536
</p>
2637

2738
---
@@ -171,4 +182,4 @@ that build upon or integrate with Passport.
171182

172183
[The MIT License](http://opensource.org/licenses/MIT)
173184

174-
Copyright (c) 2011-2019 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>
185+
Copyright (c) 2011-2021 Jared Hanson <[https://www.jaredhanson.me/](https://www.jaredhanson.me/)>

SPONSORS.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
## Gold Sponsors
22

3-
[![LoginRadius](https://raw.githubusercontent.com/jaredhanson/passport/master/sponsors/loginradius.png)](https://www.loginradius.com/)
4-
<br><br>
53
[![WorkOS](https://raw.githubusercontent.com/jaredhanson/passport/master/sponsors/workos.png)](https://workos.com/)
4+
<br>
5+
[![Snyk](https://raw.githubusercontent.com/jaredhanson/passport/master/sponsors/snyk.png)](https://snyk.io/)
66

77
## Sponsors
88

99
- [CodePilot.ai](https://codepilot.ai/)
10+
- [Jeremy Combs](https://github.com/jmcombs)
11+
- [Gadget](https://gadget.dev/)
1012
- Kelly Burke
1113
- [Matt Miller](https://mmiller.me/)
14+
15+
## Past Sponsors
16+
17+
- [LoginRadius](https://www.loginradius.com/)

etc/jsdoc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["plugins/markdown"]
3+
}

0 commit comments

Comments
 (0)