en/decoding abstraction
This commit is contained in:
parent
2966355b0e
commit
4a10ffaaa2
13 changed files with 367 additions and 69 deletions
|
@ -6,11 +6,11 @@ import (
|
|||
|
||||
"github.com/caos/oidc/pkg/oidc"
|
||||
"github.com/caos/oidc/pkg/rp"
|
||||
"github.com/gorilla/schema"
|
||||
"github.com/caos/oidc/pkg/utils"
|
||||
)
|
||||
|
||||
type SessionEnder interface {
|
||||
Decoder() *schema.Decoder
|
||||
Decoder() utils.Decoder
|
||||
Storage() Storage
|
||||
IDTokenVerifier() rp.Verifier
|
||||
DefaultLogoutRedirectURI() string
|
||||
|
@ -39,7 +39,7 @@ func EndSession(w http.ResponseWriter, r *http.Request, ender SessionEnder) {
|
|||
http.Redirect(w, r, session.RedirectURI, http.StatusFound)
|
||||
}
|
||||
|
||||
func ParseEndSessionRequest(r *http.Request, decoder *schema.Decoder) (*oidc.EndSessionRequest, error) {
|
||||
func ParseEndSessionRequest(r *http.Request, decoder utils.Decoder) (*oidc.EndSessionRequest, error) {
|
||||
err := r.ParseForm()
|
||||
if err != nil {
|
||||
return nil, ErrInvalidRequest("error parsing form")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue