Silvan
1b81a2e890
Merge pull request #151 from caos/sign-concurrency
2022-03-01 10:07:30 +01:00
Ydris Rebibane
5601add628
feat: Allow the use of a custom discovery endpoint ( #152 )
...
* Allow the use of custom endpoints
* Remove the custom constrtouctor and replace with an optional argument to override the discovery endpoit
2022-02-16 09:14:54 +01:00
Livio Amstutz
e39146c98e
fix: ensure signer has key on OP creation
2022-01-31 07:27:52 +01:00
Livio Amstutz
7ea5ddf250
add missing import
2022-01-28 09:48:37 +01:00
Livio Amstutz
bcd9ec8d85
fix: handle keys without use
in FindMatchingKey
2022-01-28 09:42:42 +01:00
Livio Amstutz
eb10752e48
feat: Token Revocation, Request Object and OP Certification ( #130 )
...
FEATURES (and FIXES):
- support OAuth 2.0 Token Revocation [RFC 7009](https://datatracker.ietf.org/doc/html/rfc7009 )
- handle request object using `request` parameter [OIDC Core 1.0 Request Object](https://openid.net/specs/openid-connect-core-1_0.html#RequestObject )
- handle response mode
- added some information to the discovery endpoint:
- revocation_endpoint (added with token revocation)
- revocation_endpoint_auth_methods_supported (added with token revocation)
- revocation_endpoint_auth_signing_alg_values_supported (added with token revocation)
- token_endpoint_auth_signing_alg_values_supported (was missing)
- introspection_endpoint_auth_signing_alg_values_supported (was missing)
- request_object_signing_alg_values_supported (added with request object)
- request_parameter_supported (added with request object)
- fixed `removeUserinfoScopes ` now returns the scopes without "userinfo" scopes (profile, email, phone, addedd) [source diff](https://github.com/caos/oidc/pull/130/files#diff-fad50c8c0f065d4dbc49d6c6a38f09c992c8f5d651a479ba00e31b500543559eL170-R171 )
- improved error handling (pkg/oidc/error.go) and fixed some wrong OAuth errors (e.g. `invalid_grant` instead of `invalid_request`)
- improved MarshalJSON and added MarshalJSONWithStatus
- removed deprecated PEM decryption from `BytesToPrivateKey` [source diff](https://github.com/caos/oidc/pull/130/files#diff-fe246e428e399ccff599627c71764de51387b60b4df84c67de3febd0954e859bL11-L19 )
- NewAccessTokenVerifier now uses correct (internal) `accessTokenVerifier` [source diff](https://github.com/caos/oidc/pull/130/files#diff-3a01c7500ead8f35448456ef231c7c22f8d291710936cac91de5edeef52ffc72L52-R52 )
BREAKING CHANGE:
- move functions from `utils` package into separate packages
- added various methods to the (OP) `Configuration` interface [source diff](https://github.com/caos/oidc/pull/130/files#diff-2538e0dfc772fdc37f057aecd6fcc2943f516c24e8be794cce0e368a26d20a82R19-R32 )
- added revocationEndpoint to `WithCustomEndpoints ` [source diff](https://github.com/caos/oidc/pull/130/files#diff-19ae13a743eb7cebbb96492798b1bec556673eb6236b1387e38d722900bae1c3L355-R391 )
- remove unnecessary context parameter from JWTProfileExchange [source diff](https://github.com/caos/oidc/pull/130/files#diff-4ed8f6affa4a9631fa8a034b3d5752fbb6a819107141aae00029014e950f7b4cL14 )
2021-11-02 13:21:35 +01:00
Witold Konior
763d3334e7
feat: Enable parsing email_verified from string. ( #139 )
...
* Enable parsing email_verified from string.
AWS Cognito will return email_verified from /userinfo endpoint as string.
This fix will accept proper boolean values as well as string values.
Links for reference:
https://forums.aws.amazon.com/thread.jspa?messageID=949441󧳁
https://discuss.elastic.co/t/openid-error-after-authenticating-against-aws-cognito/206018/11
* feat: Enable parsing email_verified from string.
2021-11-02 09:14:33 +01:00
陈杨文
c45f03e144
fix: allowed ConcatenateJSON with empty input ( #138 )
2021-10-28 07:06:34 +02:00
陈杨文
ff2c164057
fix: improve example & fix userinfo marshal ( #132 )
...
* fix: example client should track state, call cli.CodeFlow need context
* fix: oidc userinfo can UnmarshalJSON with address
* rp Discover use client.Discover
* add instruction for example to README.md
2021-10-08 08:20:45 +02:00
Livio Amstutz
a63fbee93d
fix: improve JWS and key verification ( #128 )
...
* fix: improve JWS and key verification
* fix: get remote keys if no cached key matches
* fix: get remote keys if no cached key matches
* fix exactMatch
* fix exactMatch
* chore: change default branch name in .releaserc.js
2021-09-14 15:13:44 +02:00
Timo Volkmann
99812e0b8e
pkce: encode code verifier with base64 without padding
...
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-09-13 13:56:38 +02:00
Timo Volkmann
af3a497b6d
fix: make pkce code_verifier spec compliant #125
...
follow recommendations for code_verifier: https://datatracker.ietf.org/doc/html/rfc7636#section-4.1
2021-09-09 14:33:59 +02:00
Beardo Moore
581885afb1
task: Ease dev host name constraints
...
This changes the requirements for a issuer hostname to allow anything
that is `http`. The reason for this is because the user of the library
already has to make a conscious decision to set `CAOS_OIDC_DEV` so they
should already understand the risks of not using `https`. The primary
motivation for this change is to allow IdPs to be created in a
containerized integration test environment. Specifically setting up a
docker compose file that starts all parts of the system with a test IdP
using this library where the DNS name will not be `localhost`.
2021-08-26 20:32:51 +00:00
Livio Amstutz
1132c9d93d
fix: removeUserinfoScopes return new slice (without manipulating passed one) ( #110 )
2021-07-21 08:27:38 +02:00
Livio Amstutz
8a35b89815
fix: supported ui locales from config ( #107 )
2021-07-09 09:20:03 +02:00
Livio Amstutz
147c6dca6e
fixes
2021-07-06 08:58:35 +02:00
Livio Amstutz
58e27e8073
simplify KeyProvider interface
2021-06-30 14:10:38 +02:00
Livio Amstutz
0b446618c7
custom claims for assertion and jwt profile request
2021-06-23 14:01:31 +02:00
Livio Amstutz
e9fc710b1f
Merge branch 'master' into jwt-profile-storage
...
# Conflicts:
# pkg/op/verifier_jwt_profile.go
2021-06-23 13:51:20 +02:00
Livio Amstutz
850faa159d
fix: rp verification process ( #95 )
...
* fix: rp verification process
* types
* comments
* fix cli client
2021-06-23 11:08:54 +02:00
Livio Amstutz
39fef3e7fb
fix: simplify JWTProfileVerifier interface
2021-06-21 14:04:38 +02:00
Livio Amstutz
400f5c4de4
fix: parse max_age and prompt correctly (and change scope type) ( #105 )
...
* fix: parse max_age and prompt correctly (and change scope type)
* remove unnecessary omitempty
2021-06-16 08:34:01 +02:00
Livio Amstutz
3e336a4075
fix: check refresh token grant type ( #100 )
2021-05-31 11:35:03 +02:00
Livio Amstutz
14faebbb77
fix: check grant types and add refresh token to discovery
2021-05-27 13:44:11 +02:00
Livio Amstutz
d362dd7546
handle error
2021-05-11 15:20:22 +02:00
Livio Amstutz
90b87289cb
Update pkg/op/token_code.go
...
Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
2021-05-11 15:17:10 +02:00
Livio Amstutz
2a11a1979e
rename storage methods and fix mocks
2021-05-11 10:48:11 +02:00
Livio Amstutz
3a46908051
Merge branch 'master' into refresh-token
2021-05-11 10:27:43 +02:00
Livio Amstutz
be04244212
amr and scopes
2021-05-11 10:26:25 +02:00
Livio Amstutz
540a7bd7be
improve Loopback check
2021-04-29 12:43:21 +02:00
Livio Amstutz
5119d7aea3
begin refresh token
2021-04-29 09:20:01 +02:00
Livio Amstutz
72fc86164c
fix: allow loopback redirect_uri for native apps
2021-04-26 14:31:26 +02:00
Livio Amstutz
a2601f1584
fix: return error when delegating user in jwt profile request ( #94 )
2021-04-23 11:53:03 +02:00
Livio Amstutz
b258b3cadb
fix: url safe encryption with no padding ( #93 )
2021-04-19 13:41:27 +02:00
Elio Bischof
5cd7bae505
fix: cli client ( #92 )
...
* fix: cli client
* fix: print shutdown error correctly
2021-04-08 09:54:39 +02:00
Livio Amstutz
8f6e2c5974
chore: improve signer log messages
2021-03-05 07:53:35 +01:00
Livio Amstutz
d7d7daab2d
fix: encoding of basic auth header values
2021-03-05 07:44:37 +01:00
Elio Bischof
f2f509a522
fix: wrap original fetch key error
2021-03-02 23:58:34 +01:00
Livio Amstutz
e1f0456228
merge
2021-02-22 14:57:15 +01:00
Livio Amstutz
97a567f554
Merge branch 'master' into signingkey
...
# Conflicts:
# pkg/op/mock/storage.mock.go
2021-02-22 14:56:37 +01:00
Livio Amstutz
1518c843de
feat: token introspection ( #83 )
...
* introspect
* introspect and client assertion
* introspect and client assertion
* scopes
* token introspection
* introspect
* refactoring
* fixes
* clenaup
* Update example/internal/mock/storage.go
Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
* clenaup
Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
2021-02-15 13:43:50 +01:00
Livio Amstutz
1049c44c3e
Merge remote-tracking branch 'origin/token-introspection' into signingkey
...
# Conflicts:
# pkg/op/mock/storage.mock.go
# pkg/op/storage.go
2021-02-12 13:02:04 +01:00
Livio Amstutz
5678693d44
clenaup
2021-02-12 12:52:33 +01:00
Livio Amstutz
0c7b2605bd
clenaup
2021-02-12 07:02:10 +01:00
Livio Amstutz
01ff740f4e
fixes
2021-02-12 06:47:16 +01:00
Livio Amstutz
0ca2370d48
refactoring
2021-02-11 17:38:58 +01:00
Livio Amstutz
138da8a208
introspect
2021-02-10 16:42:01 +01:00
Livio Amstutz
134999bc33
Merge branch 'master' into token-introspection
2021-02-04 07:52:34 +01:00
Livio Amstutz
fa92a20615
fix: make GenerateJWTProfileToken public ( #82 )
2021-02-03 13:04:06 +01:00
Livio Amstutz
345fc7e837
token introspection
2021-02-03 10:42:01 +01:00