pulumi/pkg/backend/httpstate
bors[bot] c082382b04
Merge #10745
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>
2022-10-07 19:59:55 +00:00
..
client Lint 2022-09-22 10:02:04 -04:00
backend.go Merge #10745 2022-10-07 19:59:55 +00:00
backend_test.go ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00
console.go Add support for a PULUMI_CONSOLE_DOMAIN env var (#4410) 2020-04-17 11:50:00 -07:00
console_test.go ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00
crypto.go Require a config path to be passed to NewSecret methods 2022-10-03 22:45:42 +01:00
crypto_test.go Move default secret manager to stack (#10423) 2022-08-18 15:31:34 +01:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
policypack.go Respond to SIGINT during plugin install (#9793) 2022-06-09 14:57:56 -07:00
snapshot.go Update error handling (#8406) 2021-11-12 18:37:17 -08:00
stack.go Move default secret manager to stack (#10423) 2022-08-18 15:31:34 +01:00
state.go Add getOrganization to nodejs and python (#10504) 2022-08-31 10:33:29 +01:00
token_source.go Reintroduce renew lease optimization (#10462) 2022-08-30 14:04:42 -04:00
token_source_test.go Disable token_source_test on windows (#10557) 2022-09-01 01:30:52 +02:00