begin parsing
This commit is contained in:
parent
4b2f7c9de4
commit
3d5de74d02
4 changed files with 73 additions and 17 deletions
|
@ -4,11 +4,24 @@ import (
|
|||
"errors"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/schema"
|
||||
|
||||
"github.com/caos/oidc/pkg/oidc"
|
||||
)
|
||||
|
||||
func ParseAuthRequest(w http.ResponseWriter, r *http.Request) (*oidc.AuthRequest, error) {
|
||||
return nil, errors.New("Unimplemented") //TODO: impl
|
||||
err := r.ParseForm()
|
||||
if err != nil {
|
||||
return nil, errors.New("Unimplemented") //TODO: impl
|
||||
}
|
||||
authReq := new(oidc.AuthRequest)
|
||||
|
||||
//TODO:
|
||||
d := schema.NewDecoder()
|
||||
d.IgnoreUnknownKeys(true)
|
||||
|
||||
err = d.Decode(authReq, r.Form)
|
||||
return authReq, err
|
||||
}
|
||||
|
||||
func ValidateAuthRequest(authRequest *oidc.AuthRequest) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue