Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tokenSource in sessionConfig #1

Merged
merged 5 commits into from
Jun 12, 2023
Merged

feat: add tokenSource in sessionConfig #1

merged 5 commits into from
Jun 12, 2023

Conversation

ItsSudip
Copy link
Member

@ItsSudip ItsSudip commented Jun 6, 2023

We are adding tokensource in sessionConfig as it is an interface and it can be developed by the user depending on their need.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added unit tests for the code
  • I have made corresponding changes to the documentation

@ItsSudip ItsSudip requested a review from soumyadebm as a code owner June 6, 2023 14:26
@ItsSudip ItsSudip requested review from koladilip and removed request for soumyadebm June 6, 2023 14:26
main.go Outdated
@@ -45,13 +45,15 @@ func generate_access_token(config *oauth2.Config) (*oauth2.Token, error) {
}

func get_session_config(config *oauth2.Config, token *oauth2.Token) bingads.SessionConfig {
tokenSource := config.TokenSource(context.TODO(), token)
return bingads.SessionConfig{
OAuth2Config: config,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need OAuth2Config and OAuth2Token now?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might not be required

@ItsSudip ItsSudip merged commit 532ead4 into main Jun 12, 2023
@ItsSudip ItsSudip deleted the feat.bingads branch June 12, 2023 15:47
@github-actions github-actions bot mentioned this pull request Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants