Documentation ¶
Index ¶
- type Options
- func (o *Options) Address() string
- func (o *Options) LoginFlowURL() string
- func (o *Options) LoginPageURL() string
- func (o *Options) LogoutFlowURL() string
- func (o *Options) RecoveryFlowURL() string
- func (o *Options) RegistrationURL() string
- func (o *Options) SetFromCommandLine() *Options
- func (o *Options) SettingsURL() string
- func (o *Options) Validate() error
- func (o *Options) WhoAmIURL() string
- type URLValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { // KratosAdminURL is the URL where ORY Kratos's Admin API is located at. // If this app and ORY Kratos are running in the same private network, this should be the // private network address (e.g. kratos-admin.svc.cluster.local). KratosAdminURL *url.URL // KratosPublicURL is the URL where ORY Kratos's Public API is located at. // If this app and ORY Kratos are running in the same private network, this should be the // private network address (e.g. kratos-public.svc.cluster.local). KratosPublicURL *url.URL // KratosBrowserURL is the URL where ORY Kratos's self service browser endpoints are located at. KratosBrowserURL *url.URL // BaseURL is the base url of this app. If served e.g. behind a proxy or via GitHub pages // this would be the path, e.g. https://mywebsite.com/kratos-selfservice-ui-go/. Must be absolute! BaseURL *url.URL // Host that the app is listening on. Used together with Port Host string // Port that this app is listening on. Used together with Host Port int // Duration to wait when asked to shutdown gracefully ShutdownWait time.Duration // TLSCertPath is an optional Path to certificate file. // Should be set up together with TLSKeyPath to enable HTTPS. TLSCertPath string // TLSCertPath is an optional path to key file. // Should be set up together with TLSCertPath to enable HTTPS. TLSKeyPath string // Pairs of authentication and encryption keys for Cookies CookieStoreKeyPairs [][]byte }
Options holds the application command line options
func NewOptions ¶
func NewOptions() *Options
func (*Options) LoginFlowURL ¶
LoginFlowURL returns the URL to redirect to that will start the login flow
func (*Options) LoginPageURL ¶
LoginURL returns the URL to redirect to that shows the login page
func (*Options) LogoutFlowURL ¶
LogoutFlowURL returns the URL to redirect to that will start the logout flow
func (*Options) RecoveryFlowURL ¶
RecoveryFlowURL returns the URL to redirect to that will start the recovery flow
func (*Options) RegistrationURL ¶
RegistrationURL returns the URL to redirect to that will start the registration flow
func (*Options) SetFromCommandLine ¶
SetFromCommandLine will parse the command line, and populate the Options. The special case is when the 'gen-cookie-store-key-pair' is detected, will genrate the keys and exit Will also exit if key-pairs passed in are invalid
func (*Options) SettingsURL ¶
SettingsURL returns the URL to redirect to that will start the settings flow
type URLValue ¶
URLValue is a custom data type for parsing URL values with the 'flag' package