Skip to content

Commit

Permalink
feat: pass client in logout request (#2483)
Browse files Browse the repository at this point in the history
Closes #2468

Co-authored-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
  • Loading branch information
honzapatCZ and aeneasr committed May 14, 2021
1 parent 77d1000 commit 43b391d
Show file tree
Hide file tree
Showing 127 changed files with 1,232 additions and 2,836 deletions.
6 changes: 6 additions & 0 deletions consent/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,12 @@ func (h *Handler) GetLogoutRequest(w http.ResponseWriter, r *http.Request, ps ht
h.r.Writer().WriteError(w, r, err)
return
}

// We do not want to share the secret so remove it.
if request.Client != nil {
request.Client.Secret = ""
}

if request.WasHandled {
h.r.Writer().WriteCode(w, r, http.StatusGone, &RequestWasHandledResponse{
RedirectTo: request.RequestURL,
Expand Down
2 changes: 1 addition & 1 deletion consent/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ type LogoutRequest struct {
Accepted bool `json:"-" db:"accepted"`
Rejected bool `db:"rejected" json:"-"`
ClientID sql.NullString `json:"-" db:"client_id"`
Client *client.Client `json:"-" db:"-"`
Client *client.Client `json:"client" db:"-"`
}

func (_ LogoutRequest) TableName() string {
Expand Down
3 changes: 2 additions & 1 deletion driver/config/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"os"
"strings"

"github.com/ory/x/configx"
"github.com/rs/cors"

"github.com/ory/x/configx"
)

const (
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 17 additions & 32 deletions internal/httpclient/client/admin/accept_login_request_parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 43b391d

Please sign in to comment.