* feat: implement SSI Authentication Client and User Store * feat: add user activation command with validation and wizard integration * fix: set default values for BflUrl and VaultUrl in user activation command
23 lines
457 B
Go
23 lines
457 B
Go
package wizard
|
|
|
|
import "fmt"
|
|
|
|
// AuthError represents authentication errors
|
|
type AuthError struct {
|
|
Code ErrorCode `json:"code"`
|
|
Message string `json:"message"`
|
|
Data any `json:"data,omitempty"`
|
|
}
|
|
|
|
func (e *AuthError) Error() string {
|
|
return fmt.Sprintf("[%s] %s", e.Code, e.Message)
|
|
}
|
|
|
|
func NewAuthError(code ErrorCode, message string, data any) *AuthError {
|
|
return &AuthError{
|
|
Code: code,
|
|
Message: message,
|
|
Data: data,
|
|
}
|
|
}
|