Documentation ¶
Overview ¶
Package oidc provide OpenID Connect integration for cacheroach.
Index ¶
Constants ¶
View Source
const ( AuthorizationCookie = "authorization" DestinationCookie = "cacheroach-destination" NonceCookie = "cacheroach-oidc-nonce" StateCookie = "cacheroach-oidc-state" )
These cookies are used during the authentication flow.
View Source
const ReceivePath = "/_/oidc/receive"
ReceivePath will be added to the redirect path.
Variables ¶
View Source
var ErrPermanentFailure = errors.New("OIDC refresh needed")
ErrPermanentFailure indicates that the principal must be reauthorized by the OIDC provider in order to be usable.
View Source
var Set = wire.NewSet( ProvideConnector, )
Set is used by wire.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector encapsulates the OIDC integration.
func ProvideConnector ¶
func ProvideConnector( ctx context.Context, auto promauto.Factory, bt *bootstrap.Bootstrapper, cfg *common.Config, logger *log.Logger, principals principal.PrincipalsServer, tokens token.TokensServer, ) (*Connector, error)
ProvideConnector is called by wire.
func (*Connector) Receive ¶
func (c *Connector) Receive(w http.ResponseWriter, r *http.Request)
Receive a JWT token from the OIDC provider to create a principal and issue a session token.
Click to show internal directories.
Click to hide internal directories.