@@ -668,7 +668,6 @@ func (cca Client) AcquireTokenByUsernamePassword(ctx context.Context, scopes []s
668668// acquireTokenByAuthCodeOptions contains the optional parameters used to acquire an access token using the authorization code flow.
669669type acquireTokenByAuthCodeOptions struct {
670670 challenge , claims , tenantID string
671- extraBodyParameters map [string ]string
672671}
673672
674673// AcquireByAuthCodeOption is implemented by options for AcquireTokenByAuthCode
@@ -702,23 +701,22 @@ func WithChallenge(challenge string) interface {
702701// AcquireTokenByAuthCode is a request to acquire a security token from the authority, using an authorization code.
703702// The specified redirect URI must be the same URI that was used when the authorization code was requested.
704703//
705- // Options: [WithChallenge], [WithClaims], [WithTenantID]]
704+ // Options: [WithChallenge], [WithClaims], [WithTenantID]
706705func (cca Client ) AcquireTokenByAuthCode (ctx context.Context , code string , redirectURI string , scopes []string , opts ... AcquireByAuthCodeOption ) (AuthResult , error ) {
707706 o := acquireTokenByAuthCodeOptions {}
708707 if err := options .ApplyOptions (& o , opts ); err != nil {
709708 return AuthResult {}, err
710709 }
711710
712711 params := base.AcquireTokenAuthCodeParameters {
713- Scopes : scopes ,
714- Code : code ,
715- Challenge : o .challenge ,
716- Claims : o .claims ,
717- AppType : accesstokens .ATConfidential ,
718- Credential : cca .cred , // This setting differs from public.Client.AcquireTokenByAuthCode
719- RedirectURI : redirectURI ,
720- TenantID : o .tenantID ,
721- ExtraBodyParameters : o .extraBodyParameters ,
712+ Scopes : scopes ,
713+ Code : code ,
714+ Challenge : o .challenge ,
715+ Claims : o .claims ,
716+ AppType : accesstokens .ATConfidential ,
717+ Credential : cca .cred , // This setting differs from public.Client.AcquireTokenByAuthCode
718+ RedirectURI : redirectURI ,
719+ TenantID : o .tenantID ,
722720 }
723721
724722 return cca .base .AcquireTokenByAuthCode (ctx , params )
@@ -788,8 +786,7 @@ func (cca Client) AcquireTokenByCredential(ctx context.Context, scopes []string,
788786
789787// acquireTokenOnBehalfOfOptions contains optional configuration for AcquireTokenOnBehalfOf
790788type acquireTokenOnBehalfOfOptions struct {
791- claims , tenantID string
792- extraBodyParameters map [string ]string
789+ claims , tenantID string
793790}
794791
795792// AcquireOnBehalfOfOption is implemented by options for AcquireTokenOnBehalfOf
@@ -807,12 +804,11 @@ func (cca Client) AcquireTokenOnBehalfOf(ctx context.Context, userAssertion stri
807804 return AuthResult {}, err
808805 }
809806 params := base.AcquireTokenOnBehalfOfParameters {
810- Scopes : scopes ,
811- UserAssertion : userAssertion ,
812- Claims : o .claims ,
813- Credential : cca .cred ,
814- TenantID : o .tenantID ,
815- ExtraBodyParameters : o .extraBodyParameters ,
807+ Scopes : scopes ,
808+ UserAssertion : userAssertion ,
809+ Claims : o .claims ,
810+ Credential : cca .cred ,
811+ TenantID : o .tenantID ,
816812 }
817813 return cca .base .AcquireTokenOnBehalfOf (ctx , params )
818814}
0 commit comments