Trong Huu Nguyen
43cb01ad00
wip: idporten mock server
2021-08-24 07:44:05 +02:00
Kim Tore Jensen
9354ee7629
wip: mock authorization server
2021-08-23 15:12:47 +02:00
Kim Tore Jensen
764adc3d77
wip: tests for authorize
2021-08-23 14:39:48 +02:00
Kim Tore Jensen
6c23aaa243
test for login url handler
2021-08-23 14:03:35 +02:00
Kim Tore Jensen
b4b9fd1a2a
implement front-channel logout
2021-08-23 13:44:26 +02:00
Kim Tore Jensen
612fcaed78
deduplication; store sessions with name
2021-08-23 13:29:15 +02:00
Kent Daleng
d2a3db75c2
refactor cookie handling
2021-08-23 13:11:50 +02:00
Kim Tore Jensen
1d36b8e6a3
code restructuring
2021-08-23 11:17:30 +02:00
Kim Tore Jensen
42d6d93ee3
lock concurrent session writes
2021-08-23 11:10:59 +02:00
Kim Tore Jensen
2d7adb55b5
remove unused session id
2021-08-23 11:01:30 +02:00
Kim Tore Jensen
0677c29c5b
fix merge imports
2021-08-23 11:00:13 +02:00
Kim Tore Jensen
a7975d707c
fixes after discussion with TT and TH
2021-08-23 10:58:46 +02:00
Trong Huu Nguyen
eb7f18b46d
wip: replace generated session value with provided value
2021-08-23 10:56:31 +02:00
Trong Huu Nguyen
7ab8967b91
test: remove debug logging
...
Co-Authored-By: Kent Daleng <kent.daleng@nav.no >
2021-08-23 10:27:45 +02:00
Trong Huu Nguyen
1fcc97819b
feat: implement self-initiated logout
...
Co-authored-by: Kent Daleng <kent.daleng@nav.no >
2021-08-23 10:26:47 +02:00
Trong Huu Nguyen
f36848babe
feat: validate id_token in auth code flow
...
Co-authored-by: Kent Daleng <kent.daleng@nav.no >
2021-08-23 09:59:15 +02:00
Kim Tore Jensen
83b7eb65b0
fix crypt tests
2021-08-20 13:09:29 +02:00
Kim Tore Jensen
9722c17eb5
route requests to upstream host
2021-08-20 12:22:17 +02:00
Kim Tore Jensen
23f7c9bd6d
WIP proxying
2021-08-19 17:32:10 +02:00
Kim Tore Jensen
c9668986a6
encrypt cookies and store access tokens in-memory with browser session
2021-08-19 15:25:39 +02:00
Kim Tore Jensen
8baa18281d
remove caos/oidc as dependency
2021-08-19 14:25:55 +02:00
Kim Tore Jensen
262413036c
functional oauth2 pkce flow
2021-08-19 14:24:24 +02:00
Kent Daleng
8815ffb34b
wip: callback function
2021-08-19 14:05:21 +02:00
Kim Tore Jensen
4da8e5263f
loginurl as our own implementation
2021-08-19 13:05:39 +02:00
Kim Tore Jensen
60ce40e404
fixes and formatting
2021-08-19 12:03:56 +02:00
Kent Daleng
956cda2a40
generate a codeverifier better
2021-08-19 12:02:54 +02:00
Kent Daleng
6d5a14358e
generate a long enough code_verifier
...
idporten wants one at least 43 chars long; a single UUID is 36.. so i smash two together :)
also, this involves grabbing the internals of the function we called earlier and putting it here instead
2021-08-19 08:35:25 +02:00
Kent Daleng
7458ebd5d7
attempt to exchange code on callback
2021-08-18 13:08:23 +02:00
Kent Daleng
b1272ed712
refactor login, use caos/oidc
2021-08-18 11:42:50 +02:00
Kim Tore Jensen
6c9c34244f
configurable oauth2 redirect url parameters
2021-08-18 09:59:44 +02:00
Kent Daleng
5b625769d1
use authorization endpoint from wellknown
2021-08-18 09:46:15 +02:00
Kent Daleng
3784006e99
fetch well-known config from remote and store it in runtime config
2021-08-18 07:46:09 +02:00
Kim Tore Jensen
2b5206fdff
run a webserver and supply a non-working login redirect uri
2021-08-17 15:31:03 +02:00
Kent Daleng
1177ef1210
implement config and logging
2021-08-17 14:30:34 +02:00