Documentation
¶
Index ¶
- type Client
- type Connection
- type IDToken
- type Request
- type RequestType
- type Response
- type ResponseType
- type Server
- func (s *Server) AddClient(clientID, clientSecret string, redirectURIs []string)
- func (s *Server) AddStaticFS(filesystem fs.FS)
- func (s *Server) GetClient(r *http.Request) *Client
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) SetCallback(f func(req *Request) Response)
- func (s *Server) SetClient(r *http.Request, client *Client) *http.Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
type IDToken ¶
type IDToken struct {
Issuer string `json:"iss"`
SubjectIdentifier string `json:"sub"`
Audience string `json:"aud"`
Expiration int64 `json:"exp"`
IssuedAt int64 `json:"iat"`
Nonce string `json:"nonce,omitempty"`
PreferredUsername string `json:"preferred_username,omitempty"`
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
EmailVerified bool `json:"email_verified,omitempty"`
Groups []string `json:"groups,omitempty"`
}
https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.2
type RequestType ¶
type RequestType int
const ( RequestTypeInvalid RequestType = iota RequestTypeUserPassword // regular authentication: user and password RequestTypeSendOTP // client is requesting OTP to be sent to their devices RequestTypeOTP // client has just sent the OTP to be checked )
type Response ¶
type Response struct {
Type ResponseType // the following fields depend on this type:
// If Type == ResponseTypeLoginOK:
User string // login for the user. Usually the same sent in the request.
Name string // user name and surname.
Mail string
Groups []string
}
type ResponseType ¶
type ResponseType int
const ( ResponseTypeInvalid ResponseType = iota ResponseTypeOK // No errors ResponseTypeLoginOK // login is successful ResponseTypeLoginFailed // login failed ResponseType2FANeeded // login is successful so far, but we need 2FA )
type Server ¶
func (*Server) AddClient ¶
AddClient adds a new client to the server. It cannot be used concurrently with any other access to Server.
func (*Server) AddStaticFS ¶
func (*Server) SetCallback ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
oidc-server
command
|
|
|
Package mergefs provides support for merging multiple filesystems together.
|
Package mergefs provides support for merging multiple filesystems together. |
Click to show internal directories.
Click to hide internal directories.