{cmd/dex,server}: expose skip approval screen option

This commit is contained in:
Eric Chiang
2016-10-07 11:53:01 -07:00
parent 182f14fb30
commit dcbe67d89c
3 changed files with 9 additions and 1 deletions

View File

@@ -72,6 +72,9 @@ func (p password) toPassword() (storage.Password, error) {
// OAuth2 describes enabled OAuth2 extensions.
type OAuth2 struct {
ResponseTypes []string `yaml:"responseTypes"`
// If specified, do not prompt the user to approve client authorization. The
// act of logging in implies authorization.
SkipApprovalScreen bool `yaml:"skipApprovalScreen"`
}
// Web is the config format for the HTTP server.

View File

@@ -116,6 +116,7 @@ func serve(cmd *cobra.Command, args []string) error {
serverConfig := server.Config{
SupportedResponseTypes: c.OAuth2.ResponseTypes,
SkipApprovalScreen: c.OAuth2.SkipApprovalScreen,
Issuer: c.Issuer,
Connectors: connectors,
Storage: s,