Skip to content

Commit

Permalink
feat: support FormPostHTMLTemplate config for fosite (#647)
Browse files Browse the repository at this point in the history
Closes #646
  • Loading branch information
zhwang authored Feb 3, 2022
1 parent cf2c545 commit 570ce3f
Show file tree
Hide file tree
Showing 2 changed files with 5 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 @@ -74,6 +74,7 @@ func Compose(config *Config, storage interface{}, strategy interface{}, hasher f
ClientAuthenticationStrategy: config.GetClientAuthenticationStrategy(),
ResponseModeHandlerExtension: config.ResponseModeHandlerExtension,
MessageCatalog: config.MessageCatalog,
FormPostHTMLTemplate: config.FormPostHTMLTemplate,
}

for _, factory := range factories {
Expand Down
4 changes: 4 additions & 0 deletions compose/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
package compose

import (
"html/template"
"net/url"
"time"

Expand Down Expand Up @@ -121,6 +122,9 @@ type Config struct {

// MessageCatalog is the message bundle used for i18n
MessageCatalog i18n.MessageCatalog

// FormPostHTMLTemplate sets html template for rendering the authorization response when the request has response_mode=form_post.
FormPostHTMLTemplate *template.Template
}

// GetScopeStrategy returns the scope strategy to be used. Defaults to glob scope strategy.
Expand Down

0 comments on commit 570ce3f

Please sign in to comment.