baisc structure and server begin server impl
This commit is contained in:
parent
26bd873f4e
commit
f6ba7ab75e
17 changed files with 575 additions and 0 deletions
50
pkg/oidc/authorization.go
Normal file
50
pkg/oidc/authorization.go
Normal file
|
@ -0,0 +1,50 @@
|
|||
package oidc
|
||||
|
||||
import (
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
const (
|
||||
ResponseTypeCode = "code"
|
||||
ResponseTypeIDToken = "id_token token"
|
||||
ResponseTypeIDTokenOnly = "id_token"
|
||||
|
||||
DisplayPage = "page"
|
||||
DisplayPopup = "popup"
|
||||
DisplayTouch = "touch"
|
||||
DisplayWAP = "wap"
|
||||
|
||||
PromptNone = "none"
|
||||
PromptLogin = "login"
|
||||
PromptConsent = "consent"
|
||||
PromptSelectAccount = "select_account"
|
||||
)
|
||||
|
||||
//AuthRequest according to:
|
||||
//https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest
|
||||
//
|
||||
type AuthRequest struct {
|
||||
Scopes []string `schema:"scope"`
|
||||
ResponseType ResponseType `schema:"response_type"`
|
||||
ClientID string
|
||||
RedirectURI string //TODO: type
|
||||
|
||||
State string
|
||||
|
||||
// ResponseMode TODO: ?
|
||||
|
||||
Nonce string
|
||||
Display Display
|
||||
Prompt Prompt
|
||||
MaxAge uint32
|
||||
UILocales []language.Tag
|
||||
IDTokenHint string
|
||||
LoginHint string
|
||||
ACRValues []string
|
||||
}
|
||||
|
||||
type ResponseType string
|
||||
|
||||
type Display string
|
||||
|
||||
type Prompt string
|
Loading…
Add table
Add a link
Reference in a new issue