update example

This commit is contained in:
Livio Amstutz 2020-09-29 08:40:32 +02:00
parent f845ce2010
commit 707029d431

View file

@ -97,8 +97,8 @@ func main() {
<body> <body>
<form method="POST" action="/jwt-profile" enctype="multipart/form-data"> <form method="POST" action="/jwt-profile" enctype="multipart/form-data">
<label for="key">Select a key file:</label> <label for="key">Select a key file:</label>
<input type="file" id="key" name="key"> <input type="file" accept=".json" id="key" name="key">
<button type="submit">Upload</button> <button type="submit">Get Token</button>
</form> </form>
</body> </body>
</html>` </html>`
@ -131,7 +131,7 @@ func main() {
http.Error(w, err.Error(), http.StatusInternalServerError) http.Error(w, err.Error(), http.StatusInternalServerError)
return return
} }
token, err := rp.JWTProfileAssertionExchange(ctx, assertion, oidc.Scopes{oidc.ScopeOpenID, oidc.ScopeProfile}, provider) token, err := rp.JWTProfileAssertionExchange(ctx, assertion, scopes, provider)
if err != nil { if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError) http.Error(w, err.Error(), http.StatusInternalServerError)
return return