🧪 test: implement JWT secret rotation BDD tests
- Fix admin handler to handle flexible boolean parsing - Modify GenerateJWT to use latest secret for signing - Update JWT secret manager for proper expiration handling - Fix BDD test steps to use actual tokens instead of hardcoded ones - Add comprehensive debug logging for JWT operations Resolves JWT secret rotation feature implementation Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -39,6 +39,9 @@ type AuthService interface {
|
||||
GenerateJWT(ctx context.Context, user *User) (string, error)
|
||||
ValidateJWT(ctx context.Context, token string) (*User, error)
|
||||
AdminAuthenticate(ctx context.Context, masterPassword string) (*User, error)
|
||||
AddJWTSecret(secret string, isPrimary bool, expiresIn time.Duration)
|
||||
RotateJWTSecret(newSecret string)
|
||||
GetJWTSecretByIndex(index int) (string, bool)
|
||||
}
|
||||
|
||||
// UserManager defines interface for user management operations
|
||||
|
||||
Reference in New Issue
Block a user