Skip to content

Commit 5808de1

Browse files
kjetilkrubensworks
authored andcommitted
Add origin without cookie
1 parent fe7d174 commit 5808de1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/integration/authentication-oidc-test.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,23 @@ describe('Authentication API (OIDC)', () => {
245245
})
246246
})
247247

248+
// Configuration for originsAllowed but no auth
249+
describe('without that cookie but with globally configured origin', () => {
250+
let response
251+
before(done => {
252+
alice.get('/')
253+
.set('Origin', 'https://test.apps.solid.invalid')
254+
.end((err, res) => {
255+
response = res
256+
done(err)
257+
})
258+
})
259+
260+
it('should return a 401', () => {
261+
expect(response).to.have.property('status', 401)
262+
})
263+
})
264+
248265
// Not authenticated but also wrong origin, TODO 401 or 403?
249266
describe('without that cookie and a matching origin', () => {
250267
let response

0 commit comments

Comments
 (0)