Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Oauth2Request ¶
type Oauth2Request struct{}
func NewOauth2Request ¶
func NewOauth2Request() *Oauth2Request
func (Oauth2Request) Handler ¶
func (Oauth2Request) Handler(proxyRoute gobis.ProxyRoute, params interface{}, next http.Handler) (http.Handler, error)
func (Oauth2Request) Schema ¶
func (Oauth2Request) Schema() interface{}
type Oauth2RequestConfig ¶
type Oauth2RequestConfig struct {
Oauth2Request *Oauth2RequestOptions `mapstructure:"oauth2request" json:"oauth2oauth2request" yaml:"oauth2oauth2request"`
}
type Oauth2RequestOptions ¶
type Oauth2RequestOptions struct {
utils.ClientRouteOption `mapstructure:",squash"`
// enable oauth2 middleware
Enabled bool `mapstructure:"enabled" json:"enabled" yaml:"enabled"`
// Uri to retrieve access token e.g.: https://my.uaa.local/oauth/token
AccessTokenUri string `mapstructure:"access_token_uri" json:"access_token_uri" yaml:"access_token_uri"`
// Client id set in your oauth provider
// This field is mandatory
ClientId string `mapstructure:"client_id" json:"client_id" yaml:"client_id"`
// Client secret set in your oauth provider
ClientSecret string `mapstructure:"client_secret" json:"client_secret" yaml:"client_secret"`
// Scopes that your app need
// context group will be filled for other middlewares with these scopes
Scopes []string `mapstructure:"scopes" json:"scopes" yaml:"scopes"`
}
Click to show internal directories.
Click to hide internal directories.