Skip to content

Commit

Permalink
compose: Makes SendDebugMessages first class citizen (ory#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
budougumi0617 committed Dec 23, 2017
1 parent 73f2b05 commit 9585f91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions compose/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func Compose(config *Config, storage interface{}, strategy interface{}, hasher f
RevocationHandlers: fosite.RevocationHandlers{},
Hasher: hasher,
ScopeStrategy: config.GetScopeStrategy(),
SendDebugMessagesToClients: config.SendDebugMessagesToClients,
}

for _, factory := range factories {
Expand Down
6 changes: 6 additions & 0 deletions compose/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ type Config struct {
// DisableRefreshTokenValidation sets the introspection endpoint to disable refresh token validation.
DisableRefreshTokenValidation bool

// SendDebugMessagesToClients if set to true, includes error debug messages in response payloads. Be aware that sensitive
// data may be exposed, depending on your implementation of Fosite. Such sensitive data might include database error
// codes or other information. Proceed with caution!
SendDebugMessagesToClients bool

// ScopeStrategy sets the scope strategy that should be supported, for example fosite.WildcardScopeStrategy.
ScopeStrategy fosite.ScopeStrategy
}

Expand Down

0 comments on commit 9585f91

Please sign in to comment.