mirror of
https://github.com/davidallendj/opaal.git
synced 2025-12-20 03:27:02 -07:00
Fixed issue with scope not being added to token
This commit is contained in:
parent
6b2218efbd
commit
fddcc8d6af
3 changed files with 9 additions and 4 deletions
|
|
@ -38,6 +38,8 @@ func Login(config *Config, client *oauth.Client, provider *oidc.IdentityProvider
|
|||
)
|
||||
|
||||
var button = MakeButton(authorizationUrl, "Login with "+client.Name)
|
||||
var jwtClient = oauth.NewClient()
|
||||
jwtClient.Scope = config.Authorization.Token.Scope
|
||||
|
||||
// authorize oauth client and listen for callback from provider
|
||||
fmt.Printf("Waiting for authorization code redirect @%s/oidc/callback...\n", s.GetListenAddr())
|
||||
|
|
@ -56,17 +58,17 @@ func Login(config *Config, client *oauth.Client, provider *oidc.IdentityProvider
|
|||
Register: config.Authorization.Endpoints.Register,
|
||||
},
|
||||
JwtBearerParams: flows.JwtBearerFlowParams{
|
||||
Client: oauth.NewClient(),
|
||||
Client: jwtClient,
|
||||
IdentityProvider: provider,
|
||||
TrustedIssuer: &oauth.TrustedIssuer{
|
||||
AllowAnySubject: false,
|
||||
Issuer: s.Addr,
|
||||
Subject: "opaal",
|
||||
ExpiresAt: time.Now().Add(config.Authorization.TokenDuration),
|
||||
ExpiresAt: time.Now().Add(config.Authorization.Token.Duration),
|
||||
Scope: []string{},
|
||||
},
|
||||
Verbose: config.Options.Verbose,
|
||||
Refresh: config.Authorization.TokenRefresh,
|
||||
Refresh: config.Authorization.Token.Refresh,
|
||||
},
|
||||
}
|
||||
err = s.Login(button, provider, client, params)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue