mirror of https://github.com/pulumi/pulumi.git
c082382b04
10745: refactor: create a LoginManager interface for encapsulating backend logins r=justinvp a=svangordon-fruit <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description Do for the login functions (`Login` and `Current`) what https://github.com/pulumi/pulumi/pull/9310 did for the backend client. This provides a way to customize the login behavior. This adds a `LoginManager` interface, with `Login` and `Current` methods. The `NewLoginManager` function returns a `defaultLoginManager` instance, and to modify which `LoginManager` implementation is returned, the `newLoginManager` function can be reassigned in an init function within the `httpstate` package. Fixes # (issue) ## Checklist <!--- Please provide details if the checkbox below is to be left unchecked. --> - [ ] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [ ] I have updated the [CHANGELOG-PENDING](https://github.com/pulumi/pulumi/blob/master/CHANGELOG_PENDING.md) file with my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Service, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> Co-authored-by: Stephen Van Gordon <svangordon@apple.com> |
||
---|---|---|
.. | ||
client | ||
backend.go | ||
backend_test.go | ||
console.go | ||
console_test.go | ||
crypto.go | ||
crypto_test.go | ||
doc.go | ||
policypack.go | ||
snapshot.go | ||
stack.go | ||
state.go | ||
token_source.go | ||
token_source_test.go |