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

Fix new_token() and remove session auth from client #169

Closed
wants to merge 1 commit into from

Conversation

malachy-mcconnell
Copy link
Contributor

@malachy-mcconnell malachy-mcconnell commented Sep 16, 2020

The important change is to remove the lines

    opts[:username] = client.user
    opts[:password] = client.password

from token.rb::new_token() because client never needs nor wants to know username and password now that session auth is deprecated.

We may as well remove all the session references from client as they can no longer have any effect.

Note that new_token needs to be called like this, for example

          token = client.new_token(
            name: @name,
            services: @use_version.service_id,
            scope: 'purge_all purge_select',
            username: username,
            password: password,
          )

Which is as expected given the docs example: https://developer.fastly.com/reference/api/auth/#create-token

@malachy-mcconnell
Copy link
Contributor Author

Needs tests modified but please comment on the approach first.

@Integralist
Copy link
Contributor

Closing this pull request now we've published v4.0.0

@Integralist Integralist closed this Jan 3, 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