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 {
|
switch *c {
|
||||||
case modeImpersonationProxy:
|
case modeImpersonationProxy:
|
||||||
return "ImpersonationProxy"
|
return "ImpersonationProxy"
|
||||||
|
case modeTokenCredentialRequestAPI:
|
||||||
|
return "TokenCredentialRequestAPI"
|
||||||
default:
|
default:
|
||||||
return "TokenCredentialRequestAPI"
|
return "TokenCredentialRequestAPI"
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
// Copyright 2021 the Pinniped contributors. All Rights Reserved.
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
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.
|
// 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)
|
||||||
|
@ -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())
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user