diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2024-03-05 20:11:16 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-05 19:11:16 +1000 |
| commit | fb50f1a70c66d96391a3e9cae5721c9c78c75d8d (patch) | |
| tree | f49313d4452fbfb8072210c30d93602b81739a75 /internal/handlers/handler_authz_test.go | |
| parent | c70c83f74593c1ed75c2195e2dba74a5dfcd30cc (diff) | |
feat: oauth2 authorization bearer (#6774)
This implements user authorization utilizing the OAuth 2.0 bearer scheme (i.e. RFC6750) for both the authorize code grant and client credentials grant. This effectively allows application "passwords" when used with the client credentials grant.
Closes #2023, Closes #188.
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Diffstat (limited to 'internal/handlers/handler_authz_test.go')
| -rw-r--r-- | internal/handlers/handler_authz_test.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/internal/handlers/handler_authz_test.go b/internal/handlers/handler_authz_test.go index 559a5cb57..dbba67e46 100644 --- a/internal/handlers/handler_authz_test.go +++ b/internal/handlers/handler_authz_test.go @@ -493,8 +493,8 @@ func (s *AuthzSuite) TestShouldApplyPolicyOfOneFactorDomainWithAuthorizationHead builder := NewAuthzBuilder().WithImplementationLegacy() builder = builder.WithStrategies( - NewHeaderAuthorizationAuthnStrategy(), - NewHeaderProxyAuthorizationAuthRequestAuthnStrategy(), + NewHeaderAuthorizationAuthnStrategy("basic"), + NewHeaderProxyAuthorizationAuthRequestAuthnStrategy("basic"), NewCookieSessionAuthnStrategy(builder.config.RefreshInterval), ) @@ -540,8 +540,8 @@ func (s *AuthzSuite) TestShouldHandleAuthzWithoutHeaderNoCookie() { builder := NewAuthzBuilder().WithImplementationLegacy() builder = builder.WithStrategies( - NewHeaderAuthorizationAuthnStrategy(), - NewHeaderProxyAuthorizationAuthRequestAuthnStrategy(), + NewHeaderAuthorizationAuthnStrategy("basic"), + NewHeaderProxyAuthorizationAuthRequestAuthnStrategy("basic"), ) authz := builder.Build() @@ -573,8 +573,8 @@ func (s *AuthzSuite) TestShouldHandleAuthzWithEmptyAuthorizationHeader() { builder := NewAuthzBuilder().WithImplementationLegacy() builder = builder.WithStrategies( - NewHeaderAuthorizationAuthnStrategy(), - NewHeaderProxyAuthorizationAuthRequestAuthnStrategy(), + NewHeaderAuthorizationAuthnStrategy("basic"), + NewHeaderProxyAuthorizationAuthRequestAuthnStrategy("basic"), ) authz := builder.Build() @@ -608,8 +608,8 @@ func (s *AuthzSuite) TestShouldHandleAuthzWithAuthorizationHeaderInvalidPassword builder := NewAuthzBuilder().WithImplementationLegacy() builder = builder.WithStrategies( - NewHeaderAuthorizationAuthnStrategy(), - NewHeaderProxyAuthorizationAuthRequestAuthnStrategy(), + NewHeaderAuthorizationAuthnStrategy("basic"), + NewHeaderProxyAuthorizationAuthRequestAuthnStrategy("basic"), ) authz := builder.Build() @@ -645,7 +645,7 @@ func (s *AuthzSuite) TestShouldHandleAuthzWithIncorrectAuthHeader() { // TestSho builder := s.Builder() builder = builder.WithStrategies( - NewHeaderAuthorizationAuthnStrategy(), + NewHeaderAuthorizationAuthnStrategy("basic"), ) authz := builder.Build() |
