Fix some small lint errors

Signed-off-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
Margo Crawford 2021-02-24 16:09:15 -08:00 committed by Ryan Richard
parent aee7a7a72b
commit 975d493b8a
4 changed files with 5 additions and 3 deletions

View File

@ -24,6 +24,8 @@ func (c *conciergeMode) String() string {
switch *c { switch *c {
case modeImpersonationProxy: case modeImpersonationProxy:
return "ImpersonationProxy" return "ImpersonationProxy"
case modeTokenCredentialRequestAPI:
return "TokenCredentialRequestAPI"
default: default:
return "TokenCredentialRequestAPI" return "TokenCredentialRequestAPI"
} }

View File

@ -1,3 +1,6 @@
// Copyright 2021 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cmd package cmd
import ( import (

View File

@ -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. // The exact behavior depends on in which mode the Concierge is operating.
switch flags.conciergeMode { switch flags.conciergeMode {
case modeTokenCredentialRequestAPI: case modeTokenCredentialRequestAPI:
// do a credential exchange request // do a credential exchange request
cred, err := deps.exchangeToken(ctx, concierge, token.IDToken.Token) cred, err := deps.exchangeToken(ctx, concierge, token.IDToken.Token)

View File

@ -122,7 +122,6 @@ func runStaticLogin(out io.Writer, deps staticLoginDeps, flags staticLoginParams
// If the concierge is enabled, we need to do extra steps. // If the concierge is enabled, we need to do extra steps.
switch flags.conciergeMode { switch flags.conciergeMode {
case modeTokenCredentialRequestAPI: case modeTokenCredentialRequestAPI:
// do a credential exchange request // do a credential exchange request
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
@ -146,5 +145,4 @@ func runStaticLogin(out io.Writer, deps staticLoginDeps, flags staticLoginParams
default: default:
return fmt.Errorf("unsupported Concierge mode %q", flags.conciergeMode.String()) return fmt.Errorf("unsupported Concierge mode %q", flags.conciergeMode.String())
} }
} }