Skip to content

Commit

Permalink
Revert "oidc-authorizer: add redirect in case the token is missing"
Browse files Browse the repository at this point in the history
This reverts commit 09e8b5b.
  • Loading branch information
croissanne committed Feb 2, 2024
1 parent 67a2dc3 commit b3f78a5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion oidc-authorizer/cmd/oidc-authorizer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func main() {
logrus.Info(r.Header)
bearerToken := r.Header.Get("Authorization")
if bearerToken == "" {
http.Redirect(w, r, conf.NTRedirect, http.StatusSeeOther)
http.Error(w, "Authorization header is empty", http.StatusBadRequest)
return
}

Expand Down
1 change: 0 additions & 1 deletion oidc-authorizer/internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type Config struct {
ClientID string `env:"CLIENT_ID"`
ClientSecret string `env:"CLIENT_SECRET"`
Scopes string `env:"SCOPES"`
NTRedirect string `env:"NO_TOKEN_REDIRECT"`
}

var ErrMissingEnvTag = errors.New("missing 'env' tag in config field")
Expand Down
3 changes: 0 additions & 3 deletions templates/gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,3 @@ parameters:
- name: OIDC_PROVIDER
description: Openid connect provider (issuer)
value: "https://id.stg.fedoraproject.org/openidc/"
- name: NO_TOKEN_REDIRECT
description: URL to redirect to if no valid auth token was supplied
value: "https://osbuild.org/docs/service/fedora-console"

0 comments on commit b3f78a5

Please sign in to comment.