openid 2.0.10 → 2.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SECURITY.md +5 -0
- package/package.json +3 -3
- package/test/integration_tests.test.js +48 -28
package/SECURITY.md
ADDED
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"name": "Håvard Stranden",
|
|
19
19
|
"email": "havard.stranden@gmail.com"
|
|
20
20
|
},
|
|
21
|
-
"version": "2.0.
|
|
21
|
+
"version": "2.0.12",
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
24
24
|
"url": "http://github.com/havard/node-openid.git"
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"node": ">= 0.6.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"jest": "^
|
|
39
|
+
"jest": "^29.7.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"axios": "^
|
|
42
|
+
"axios": "^1.6.0",
|
|
43
43
|
"qs": "^6.5.2"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -43,20 +43,20 @@ test('Empty identifier', () => {
|
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
// 2016-09-09: XRI.net certificate has expired as of 2016-08-15,
|
|
47
|
-
// so disable this test for now.
|
|
46
|
+
// // 2016-09-09: XRI.net certificate has expired as of 2016-08-15,
|
|
47
|
+
// // so disable this test for now.
|
|
48
48
|
|
|
49
|
-
// test('Resolve =ryan XRI', () => {
|
|
50
|
-
// openid.discover('=ryan',
|
|
51
|
-
// true,
|
|
52
|
-
// (error, providers) => {
|
|
53
|
-
// expect(!error).toBe(true);
|
|
54
|
-
// expect(providers.length).toBe(2);
|
|
55
|
-
// });
|
|
56
|
-
// });
|
|
49
|
+
// // test('Resolve =ryan XRI', () => {
|
|
50
|
+
// // openid.discover('=ryan',
|
|
51
|
+
// // true,
|
|
52
|
+
// // (error, providers) => {
|
|
53
|
+
// // expect(!error).toBe(true);
|
|
54
|
+
// // expect(providers.length).toBe(2);
|
|
55
|
+
// // });
|
|
56
|
+
// // });
|
|
57
57
|
|
|
58
|
-
test('Resolve
|
|
59
|
-
openid.discover('https://
|
|
58
|
+
test('Resolve Steam', () => {
|
|
59
|
+
openid.discover('https://steamcommunity.com/openid/',
|
|
60
60
|
true,
|
|
61
61
|
(error, providers) => {
|
|
62
62
|
expect(error).toBeFalsy();
|
|
@@ -64,8 +64,8 @@ test('Resolve login.ubuntu.com', () => {
|
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
-
test('Resolve
|
|
68
|
-
openid.discover('
|
|
67
|
+
test('Resolve https://login.ubuntu.com', () => {
|
|
68
|
+
openid.discover('https://login.ubuntu.com',
|
|
69
69
|
true,
|
|
70
70
|
(error, providers) => {
|
|
71
71
|
expect(error).toBeFalsy();
|
|
@@ -73,22 +73,37 @@ test('Resolve LiveJournal user', () => {
|
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
test('Resolve
|
|
77
|
-
|
|
78
|
-
openid.discover('http://pupeno.com/',
|
|
76
|
+
test('Resolve LiveJournal user', () => {
|
|
77
|
+
openid.discover('http://omnifarious.livejournal.com/',
|
|
79
78
|
true,
|
|
80
79
|
(error, providers) => {
|
|
81
80
|
expect(error).toBeFalsy();
|
|
82
81
|
expect(providers.length).toBe(1);
|
|
83
|
-
expect(providers[0].version).toBe('http://openid.net/signon/1.1');
|
|
84
82
|
});
|
|
85
83
|
});
|
|
86
84
|
|
|
87
|
-
|
|
85
|
+
// 2023-11-12: This OpenID 1.1 provider seems to have gone away,
|
|
86
|
+
// so disable this test for now.
|
|
87
|
+
// test('Resolve OpenID 1.1 provider', done => {
|
|
88
|
+
// // FIXME: relying on a third party for back-level protocol support is brittle.
|
|
89
|
+
// openid.discover('http://pupeno.com/',
|
|
90
|
+
// true,
|
|
91
|
+
// (error, providers) => {
|
|
92
|
+
// expect(error).toBeFalsy();
|
|
93
|
+
// expect(providers).not.toBeNull();
|
|
94
|
+
// expect(providers).toHaveLength(1);
|
|
95
|
+
// expect(providers[0].version).toBe('http://openid.net/signon/1.1');
|
|
96
|
+
// done();
|
|
97
|
+
// });
|
|
98
|
+
// });
|
|
99
|
+
|
|
100
|
+
const performAssociation = (url, version, done) => {
|
|
88
101
|
openid.discover(url,
|
|
89
102
|
true,
|
|
90
103
|
(error, providers) => {
|
|
91
104
|
expect(error).toBeFalsy();
|
|
105
|
+
expect(providers).not.toBeNull();
|
|
106
|
+
expect(providers).toHaveLength(1);
|
|
92
107
|
const provider = providers[0];
|
|
93
108
|
openid.associate(provider, (error, result) => {
|
|
94
109
|
expect(error).toBeFalsy();
|
|
@@ -96,42 +111,46 @@ const performAssociation = (url, version) => {
|
|
|
96
111
|
expect(provider.version).toBe(version);
|
|
97
112
|
}
|
|
98
113
|
expect(result.expires_in).toBeTruthy();
|
|
114
|
+
done();
|
|
99
115
|
});
|
|
100
116
|
}
|
|
101
117
|
);
|
|
102
118
|
}
|
|
103
119
|
|
|
104
|
-
test('Associate with https://login.ubuntu.com',
|
|
105
|
-
performAssociation('https://login.ubuntu.com');
|
|
120
|
+
test('Associate with https://login.ubuntu.com', done => {
|
|
121
|
+
performAssociation('https://login.ubuntu.com',null, done);
|
|
106
122
|
});
|
|
107
123
|
|
|
108
|
-
test('Associate with http://omnifarious.livejournal.com/',
|
|
109
|
-
performAssociation('http://omnifarious.livejournal.com/');
|
|
124
|
+
test('Associate with http://omnifarious.livejournal.com/', done => {
|
|
125
|
+
performAssociation('http://omnifarious.livejournal.com/', null, done);
|
|
110
126
|
});
|
|
111
|
-
|
|
127
|
+
|
|
128
|
+
test('Associate with https://matt.wordpress.com/', done => {
|
|
112
129
|
// FIXME: relying on a third party for back-level protocol support is brittle.
|
|
113
|
-
performAssociation('https://matt.wordpress.com/', 'http://openid.net/signon/1.1',
|
|
130
|
+
performAssociation('https://matt.wordpress.com/', 'http://openid.net/signon/1.1', done);
|
|
114
131
|
});
|
|
115
132
|
|
|
116
|
-
test('Immediate authentication with https://login.ubuntu.com',
|
|
133
|
+
test('Immediate authentication with https://login.ubuntu.com', done => {
|
|
117
134
|
openid.authenticate('https://login.ubuntu.com',
|
|
118
135
|
'http://example.com/verify', null, true, false,
|
|
119
136
|
(error, url) => {
|
|
120
137
|
expect(error).toBeFalsy();
|
|
121
138
|
expect(url.indexOf('checkid_immediate')).not.toBe(-1);
|
|
139
|
+
done();
|
|
122
140
|
});
|
|
123
141
|
});
|
|
124
142
|
|
|
125
|
-
test('Setup authentication with https://login.ubuntu.com',
|
|
143
|
+
test('Setup authentication with https://login.ubuntu.com', done => {
|
|
126
144
|
openid.authenticate('https://login.ubuntu.com',
|
|
127
145
|
'http://example.com/verify', null, false, false,
|
|
128
146
|
(error, url) => {
|
|
129
147
|
expect(error).toBeFalsy();
|
|
130
148
|
expect(url.indexOf('checkid_setup')).not.toBe(-1);
|
|
149
|
+
done();
|
|
131
150
|
});
|
|
132
151
|
});
|
|
133
152
|
|
|
134
|
-
test('Setup authentication with https://login.ubuntu.com using RelyingParty object',
|
|
153
|
+
test('Setup authentication with https://login.ubuntu.com using RelyingParty object', done => {
|
|
135
154
|
const rp = new openid.RelyingParty(
|
|
136
155
|
'http://example.com/verify',
|
|
137
156
|
null,
|
|
@@ -142,5 +161,6 @@ test('Setup authentication with https://login.ubuntu.com using RelyingParty obje
|
|
|
142
161
|
(error, url) => {
|
|
143
162
|
expect(error).toBeFalsy();
|
|
144
163
|
expect(url.indexOf('checkid_setup')).not.toBe(-1);
|
|
164
|
+
done();
|
|
145
165
|
});
|
|
146
166
|
});
|