Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct { Username string `json:"preferred_username,omitempty"` Groups []string `json:"groups,omitempty"` }
Claims is how claims are structured in our bearer
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents our auth client's configuration
func NewClient ¶
func NewClient(clientID string, clientSecret string, issuerURL string, httpClient *http.Client) *Client
NewClient uses to OpenID Connect library to construct a provider which can be invoked within the internal 'authFn'.
func (*Client) AsHandlerFunc ¶
AsHandlerFunc exposes the authFn as and http.HandlerFunc. This fn includes special cases where 'trusted hosts' can be verified via their client cert or websockets which are verified separately
func (*Client) AsMiddleWare ¶
AsMiddleWare exposes the authFn for use in a middleware chain
func (*Client) AsWSInitFunc ¶
func (c *Client) AsWSInitFunc() func(context.Context, InitPayload) error
AsWSInitFunc exposes the authFn for use during websocket initialization
type InitPayload ¶
type InitPayload interface { // Authorization gets the Authorization header from the init payload Authorization() string }
InitPayload is able to provide the Authorization header from the init payload
Click to show internal directories.
Click to hide internal directories.