Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadRsaPrivateKey ¶
func ReadRsaPrivateKey(path string) (*rsa.PrivateKey, error)
Types ¶
type OauthFlowConfig ¶
type OauthFlowConfig struct {
Oauth2 *oauth2.Config
ClientCallbackUrl *url.URL
MaxLoginWindow time.Duration
StateCookie *cookies.Encrypted
}
func (*OauthFlowConfig) LoginCallbackHandle ¶
func (f *OauthFlowConfig) LoginCallbackHandle(next http.HandlerFunc) http.HandlerFunc
func (*OauthFlowConfig) LoginInitHandle ¶
func (f *OauthFlowConfig) LoginInitHandle() http.HandlerFunc
type SigningFlowConfig ¶
type SigningFlowConfig struct {
SigningAlgorithm jose.SignatureAlgorithm
PrivateKey *rsa.PrivateKey
KeyId string
Audiences []string
Issuer *url.URL
ConfigDir string
StateCookie *cookies.Encrypted
}
func (*SigningFlowConfig) IssueSurrogateToken ¶
func (f *SigningFlowConfig) IssueSurrogateToken(expires time.Time, name, email, subject string) (string, error)
Creates a Surrogate token from parameters
func (*SigningFlowConfig) RenderJwksHandle ¶
func (f *SigningFlowConfig) RenderJwksHandle() http.HandlerFunc
Renders the public key to validate the issued surrogate token
func (*SigningFlowConfig) RenderSurrogateJwtHandle ¶
func (f *SigningFlowConfig) RenderSurrogateJwtHandle(expiryCalculator func() (time.Time, error)) http.HandlerFunc
Renders a Surrogate token from data stored within an http cookie
type StateCookieConfig ¶
Click to show internal directories.
Click to hide internal directories.