Add scopes support to password grant type

This commit is contained in:
Joe Ceresini 2020-09-15 19:32:41 -04:00
parent 2ffa84a4de
commit 04b39372b0
1 changed files with 1 additions and 0 deletions

View File

@ -476,6 +476,7 @@ func (c *LoginCommand) interactiveGetTokenByPassword(hostname svchost.Hostname,
oauthConfig := &oauth2.Config{ oauthConfig := &oauth2.Config{
ClientID: clientConfig.ID, ClientID: clientConfig.ID,
Endpoint: clientConfig.Endpoint(), Endpoint: clientConfig.Endpoint(),
Scopes: clientConfig.Scopes,
} }
token, err := oauthConfig.PasswordCredentialsToken(context.Background(), username, password) token, err := oauthConfig.PasswordCredentialsToken(context.Background(), username, password)
if err != nil { if err != nil {