Documentation ¶
Index ¶
- Constants
- func AuthAmber(handlerFunc http.HandlerFunc) http.HandlerFunc
- func ServeCocsHandler(writer http.ResponseWriter, request *http.Request)
- type Config
- type ConfigOption
- func WithAmberLoginUrl(amberLoginUrl string) ConfigOption
- func WithAppId(appId string) ConfigOption
- func WithCookieName(cookieName string) ConfigOption
- func WithEncryptKey(encryptKey string) ConfigOption
- func WithForceLogin(forceLogin bool) ConfigOption
- func WithLocalUrl(localUrl string) ConfigOption
- type ConfigOptions
- type CookieValue
Constants ¶
View Source
const CookieValueContextKey = "AmberCookieValue"
Variables ¶
This section is empty.
Functions ¶
func AuthAmber ¶
func AuthAmber(handlerFunc http.HandlerFunc) http.HandlerFunc
func ServeCocsHandler ¶ added in v0.3.2
func ServeCocsHandler(writer http.ResponseWriter, request *http.Request)
Types ¶
type Config ¶
type Config struct { AppId string EncryptKey string CookieName string AmberLoginUrl string LocalUrl string ForceLogin bool }
func NewConfig ¶
func NewConfig(opts ...ConfigOption) *Config
type ConfigOption ¶
type ConfigOption func(*ConfigOptions)
func WithAmberLoginUrl ¶
func WithAmberLoginUrl(amberLoginUrl string) ConfigOption
func WithAppId ¶
func WithAppId(appId string) ConfigOption
func WithCookieName ¶
func WithCookieName(cookieName string) ConfigOption
func WithEncryptKey ¶
func WithEncryptKey(encryptKey string) ConfigOption
func WithForceLogin ¶
func WithForceLogin(forceLogin bool) ConfigOption
func WithLocalUrl ¶
func WithLocalUrl(localUrl string) ConfigOption
type ConfigOptions ¶
type CookieValue ¶
func ReadCookieValue ¶
func ReadCookieValue(request *http.Request) (*CookieValue, error)
Click to show internal directories.
Click to hide internal directories.