entity

package
v1.19.2-redfish.preview.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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.

func (*Session) IsExpired

func (s *Session) IsExpired() bool

IsExpired checks if the session has expired based on timeout.

func (*Session) Touch

func (s *Session) Touch()

Touch updates the last access time to keep session alive.

Directories

Path Synopsis
Package redfish provides entity definitions for Redfish computer systems.
Package redfish provides entity definitions for Redfish computer systems.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL