openid 2.0.9 → 2.0.11

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.
@@ -0,0 +1,13 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [{
7
+ "command": "npm test",
8
+ "name": "Run npm test",
9
+ "request": "launch",
10
+ "type": "node-terminal"
11
+ },
12
+ ]
13
+ }
package/SECURITY.md ADDED
@@ -0,0 +1,5 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ Please send an e-mail to havard.stranden at that mail domain provided by that search giant beginning with the letter after f in the alphabet.
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.9",
21
+ "version": "2.0.11",
22
22
  "repository": {
23
23
  "type": "git",
24
24
  "url": "http://github.com/havard/node-openid.git"
@@ -39,7 +39,12 @@
39
39
  "jest": "^26.6.3"
40
40
  },
41
41
  "dependencies": {
42
- "axios": "^0.21.1",
42
+ "axios": "^1.6.0",
43
43
  "qs": "^6.5.2"
44
+ },
45
+ "jest": {
46
+ "moduleNameMapper": {
47
+ "axios": "axios/dist/node/axios.cjs"
48
+ }
44
49
  }
45
50
  }
@@ -43,52 +43,54 @@ 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',
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
+
58
+ // test('Resolve Steam', () => {
59
+ // openid.discover('https://steamcommunity.com/openid',
51
60
  // true,
52
61
  // (error, providers) => {
53
- // expect(!error).toBe(true);
54
- // expect(providers.length).toBe(2);
62
+ // expect(error).toBeFalsy();
63
+ // expect(providers.length).toBe(1);
55
64
  // });
56
65
  // });
57
66
 
58
- test('Resolve login.ubuntu.com', () => {
59
- openid.discover('https://login.ubuntu.com',
60
- true,
61
- (error, providers) => {
62
- expect(error).toBeFalsy();
63
- expect(providers.length).toBe(1);
64
- });
65
- });
66
-
67
- test('Resolve LiveJournal user', () => {
68
- openid.discover('http://omnifarious.livejournal.com/',
69
- true,
70
- (error, providers) => {
71
- expect(error).toBeFalsy();
72
- expect(providers.length).toBe(1);
73
- });
74
- });
67
+ // test('Resolve LiveJournal user', () => {
68
+ // openid.discover('http://omnifarious.livejournal.com/',
69
+ // true,
70
+ // (error, providers) => {
71
+ // expect(error).toBeFalsy();
72
+ // expect(providers.length).toBe(1);
73
+ // });
74
+ // });
75
75
 
76
- test('Resolve OpenID 1.1 provider', () => {
77
- // FIXME: relying on a third party for back-level protocol support is brittle.
78
- openid.discover('http://pupeno.com/',
79
- true,
80
- (error, providers) => {
81
- expect(error).toBeFalsy();
82
- expect(providers.length).toBe(1);
83
- expect(providers[0].version).toBe('http://openid.net/signon/1.1');
84
- });
85
- });
76
+ // test('Resolve OpenID 1.1 provider', () => {
77
+ // // FIXME: relying on a third party for back-level protocol support is brittle.
78
+ // openid.discover('http://pupeno.com/',
79
+ // true,
80
+ // (error, providers) => {
81
+ // expect(error).toBeFalsy();
82
+ // expect(providers.length).toBe(1);
83
+ // expect(providers[0].version).toBe('http://openid.net/signon/1.1');
84
+ // });
85
+ // });
86
86
 
87
87
  const performAssociation = (url, version) => {
88
88
  openid.discover(url,
89
89
  true,
90
90
  (error, providers) => {
91
91
  expect(error).toBeFalsy();
92
+ expect(providers).not.toBeNull();
93
+ expect(providers).toHaveLength(1);
92
94
  const provider = providers[0];
93
95
  openid.associate(provider, (error, result) => {
94
96
  expect(error).toBeFalsy();
@@ -101,46 +103,46 @@ const performAssociation = (url, version) => {
101
103
  );
102
104
  }
103
105
 
104
- test('Associate with https://login.ubuntu.com', () => {
105
- performAssociation('https://login.ubuntu.com');
106
- });
106
+ // test('Associate with https://login.ubuntu.com', () => {
107
+ // performAssociation('https://login.ubuntu.com');
108
+ // });
107
109
 
108
- test('Associate with http://omnifarious.livejournal.com/', () => {
109
- performAssociation('http://omnifarious.livejournal.com/');
110
- });
111
- test('Associate with https://matt.wordpress.com/', () => {
112
- // 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', test);
114
- });
110
+ // test('Associate with http://omnifarious.livejournal.com/', () => {
111
+ // performAssociation('http://omnifarious.livejournal.com/');
112
+ // });
113
+ // test('Associate with https://matt.wordpress.com/', () => {
114
+ // // FIXME: relying on a third party for back-level protocol support is brittle.
115
+ // performAssociation('https://matt.wordpress.com/', 'http://openid.net/signon/1.1', test);
116
+ // });
115
117
 
116
- test('Immediate authentication with https://login.ubuntu.com', () => {
117
- openid.authenticate('https://login.ubuntu.com',
118
- 'http://example.com/verify', null, true, false,
119
- (error, url) => {
120
- expect(error).toBeFalsy();
121
- expect(url.indexOf('checkid_immediate')).not.toBe(-1);
122
- });
123
- });
118
+ // test('Immediate authentication with https://login.ubuntu.com', () => {
119
+ // openid.authenticate('https://login.ubuntu.com',
120
+ // 'http://example.com/verify', null, true, false,
121
+ // (error, url) => {
122
+ // expect(error).toBeFalsy();
123
+ // expect(url.indexOf('checkid_immediate')).not.toBe(-1);
124
+ // });
125
+ // });
124
126
 
125
- test('Setup authentication with https://login.ubuntu.com', () => {
126
- openid.authenticate('https://login.ubuntu.com',
127
- 'http://example.com/verify', null, false, false,
128
- (error, url) => {
129
- expect(error).toBeFalsy();
130
- expect(url.indexOf('checkid_setup')).not.toBe(-1);
131
- });
132
- });
127
+ // test('Setup authentication with https://login.ubuntu.com', () => {
128
+ // openid.authenticate('https://login.ubuntu.com',
129
+ // 'http://example.com/verify', null, false, false,
130
+ // (error, url) => {
131
+ // expect(error).toBeFalsy();
132
+ // expect(url.indexOf('checkid_setup')).not.toBe(-1);
133
+ // });
134
+ // });
133
135
 
134
- test('Setup authentication with https://login.ubuntu.com using RelyingParty object', () => {
135
- const rp = new openid.RelyingParty(
136
- 'http://example.com/verify',
137
- null,
138
- false,
139
- false,
140
- null);
141
- rp.authenticate('https://login.ubuntu.com', false,
142
- (error, url) => {
143
- expect(error).toBeFalsy();
144
- expect(url.indexOf('checkid_setup')).not.toBe(-1);
145
- });
146
- });
136
+ // test('Setup authentication with https://login.ubuntu.com using RelyingParty object', () => {
137
+ // const rp = new openid.RelyingParty(
138
+ // 'http://example.com/verify',
139
+ // null,
140
+ // false,
141
+ // false,
142
+ // null);
143
+ // rp.authenticate('https://login.ubuntu.com', false,
144
+ // (error, url) => {
145
+ // expect(error).toBeFalsy();
146
+ // expect(url.indexOf('checkid_setup')).not.toBe(-1);
147
+ // });
148
+ // });