Documentation
¶
Overview ¶
Package entity defines the Session data model for Redfish SessionService
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// ID is the unique session identifier (UUID)
ID string `json:"id"`
// Username is the authenticated user
Username string `json:"username"`
// Token is the X-Auth-Token (JWT token from DMT Console)
// This token can be validated using the existing JWT infrastructure
Token string `json:"token"`
// CreatedTime is when the session was created
CreatedTime time.Time `json:"created_time"`
// LastAccessTime tracks the last time this session was used
LastAccessTime time.Time `json:"last_access_time"`
// TimeoutSeconds is the session timeout in seconds
TimeoutSeconds int `json:"timeout_seconds"`
// ClientIP is the IP address of the client that created the session
ClientIP string `json:"client_ip"`
// UserAgent is the User-Agent header from the client
UserAgent string `json:"user_agent"`
// IsActive indicates if the session is still valid
IsActive bool `json:"is_active"`
}
Session represents a Redfish authentication session This entity bridges DMT Console's JWT authentication with Redfish SessionService.
func (*Session) Invalidate ¶
func (s *Session) Invalidate()
Invalidate marks the session as inactive.
Click to show internal directories.
Click to hide internal directories.