mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
Merge pull request #117023 from enj/enj/i/clean_boot
Clean up formatting
This commit is contained in:
commit
d89d5ab268
@ -116,13 +116,13 @@ func (t *TokenAuthenticator) AuthenticateToken(ctx context.Context, token string
|
||||
|
||||
ts := bootstrapsecretutil.GetData(secret, bootstrapapi.BootstrapTokenSecretKey)
|
||||
if subtle.ConstantTimeCompare([]byte(ts), []byte(tokenSecret)) != 1 {
|
||||
tokenErrorf(secret, "has invalid value for key %s, expected %s.", bootstrapapi.BootstrapTokenSecretKey, tokenSecret)
|
||||
tokenErrorf(secret, "has invalid value for key %s.", bootstrapapi.BootstrapTokenSecretKey)
|
||||
return nil, false, nil
|
||||
}
|
||||
|
||||
id := bootstrapsecretutil.GetData(secret, bootstrapapi.BootstrapTokenIDKey)
|
||||
if id != tokenID {
|
||||
tokenErrorf(secret, "has invalid value for key %s, expected %s.", bootstrapapi.BootstrapTokenIDKey, tokenID)
|
||||
tokenErrorf(secret, "has invalid value for key %s.", bootstrapapi.BootstrapTokenIDKey)
|
||||
return nil, false, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user