renaming, mocking and begin tests

This commit is contained in:
Livio Amstutz 2019-11-22 08:33:16 +01:00
parent 3d5de74d02
commit 85b71e0867
14 changed files with 309 additions and 18 deletions

View file

@ -8,9 +8,9 @@ import (
)
const (
ResponseTypeCode = "code"
ResponseTypeIDToken = "id_token token"
ResponseTypeIDTokenOnly = "id_token"
ResponseTypeCode ResponseType = "code"
ResponseTypeIDToken ResponseType = "id_token token"
ResponseTypeIDTokenOnly ResponseType = "id_token"
DisplayPage Display = "page"
DisplayPopup Display = "popup"
@ -53,6 +53,32 @@ type AuthRequest struct {
ACRValues []string `schema:"acr_values"`
}
// func (a *AuthRequest) UnmarshalText(text []byte) error {
// // var f formAuthRequest
// log.Println(string(text))
// return nil
// }
// type formAuthRequest struct {
// Scopes string `schema:"scope"`
// ResponseType string `schema:"response_type"`
// ClientID string `schema:"client_id"`
// RedirectURI string `schema:"redirect_uri"` //TODO: type
// State string `schema:"state"`
// // ResponseMode TODO: ?
// Nonce string `schema:"nonce"`
// Display string `schema:"display"`
// Prompt string `schema:"prompt"`
// MaxAge uint32 `schema:"max_age"`
// UILocales string `schema:"ui_locales"`
// IDTokenHint string `schema:"id_token_hint"`
// LoginHint string `schema:"login_hint"`
// ACRValues []string `schema:"acr_values"`
// }
type Scopes []string
func (s *Scopes) UnmarshalText(text []byte) error {