Fix some small lint errors
Signed-off-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
parent
aee7a7a72b
commit
975d493b8a
@ -24,6 +24,8 @@ func (c *conciergeMode) String() string {
|
||||
switch *c {
|
||||
case modeImpersonationProxy:
|
||||
return "ImpersonationProxy"
|
||||
case modeTokenCredentialRequestAPI:
|
||||
return "TokenCredentialRequestAPI"
|
||||
default:
|
||||
return "TokenCredentialRequestAPI"
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
// Copyright 2021 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
|
@ -190,7 +190,6 @@ func runOIDCLogin(cmd *cobra.Command, deps oidcLoginCommandDeps, flags oidcLogin
|
||||
|
||||
// The exact behavior depends on in which mode the Concierge is operating.
|
||||
switch flags.conciergeMode {
|
||||
|
||||
case modeTokenCredentialRequestAPI:
|
||||
// do a credential exchange request
|
||||
cred, err := deps.exchangeToken(ctx, concierge, token.IDToken.Token)
|
||||
|
@ -122,7 +122,6 @@ func runStaticLogin(out io.Writer, deps staticLoginDeps, flags staticLoginParams
|
||||
|
||||
// If the concierge is enabled, we need to do extra steps.
|
||||
switch flags.conciergeMode {
|
||||
|
||||
case modeTokenCredentialRequestAPI:
|
||||
// do a credential exchange request
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
@ -146,5 +145,4 @@ func runStaticLogin(out io.Writer, deps staticLoginDeps, flags staticLoginParams
|
||||
default:
|
||||
return fmt.Errorf("unsupported Concierge mode %q", flags.conciergeMode.String())
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user