mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-19 14:13:17 -04:00
add client-id flag
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
committed by
Thomas Müller
parent
3b2e1da63f
commit
bc43bfe578
@@ -35,7 +35,7 @@ type Tracing struct {
|
||||
type GraphExplorer struct {
|
||||
ClientID string
|
||||
Issuer string
|
||||
GraphUrl string
|
||||
GraphURL string
|
||||
}
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
|
||||
@@ -134,12 +134,19 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVar: "GRAPH_EXPLORER_ISSUER",
|
||||
Destination: &cfg.GraphExplorer.Issuer,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "client-id",
|
||||
Value: "graph_explorer",
|
||||
Usage: "Set the OpenID Client ID to send to the issuer",
|
||||
EnvVar: "GRAPH_EXPLORER_CLIENT_ID",
|
||||
Destination: &cfg.GraphExplorer.ClientID,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "graph-url",
|
||||
Value: "http://localhost:9120",
|
||||
Usage: "Set the url to the graph api service",
|
||||
EnvVar: "GRAPH_EXPLORER_GRAPH_URL",
|
||||
Destination: &cfg.GraphExplorer.GraphUrl,
|
||||
Destination: &cfg.GraphExplorer.GraphURL,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ func (p GraphExplorer) ConfigJs(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
io.WriteString(w, fmt.Sprintf("window.ClientId = \"%v\";", p.config.GraphExplorer.ClientID))
|
||||
io.WriteString(w, fmt.Sprintf("window.Iss = \"%v\";", p.config.GraphExplorer.Issuer))
|
||||
io.WriteString(w, fmt.Sprintf("window.GraphUrl = \"%v\";", p.config.GraphExplorer.GraphUrl))
|
||||
io.WriteString(w, fmt.Sprintf("window.GraphUrl = \"%v\";", p.config.GraphExplorer.GraphURL))
|
||||
}
|
||||
|
||||
// Static simply serves all static files.
|
||||
|
||||
Reference in New Issue
Block a user