class
Matter::SessionManager
- Matter::SessionManager
- Reference
- Object
Overview
SessionManager manages secure communication sessions
Matter uses two types of sessions:
- PASE (Password-Authenticated Session Establishment): Used during commissioning
- CASE (Certificate-Authenticated Session Establishment): Used for operational communication
During failsafe rollback, PASE sessions must be cleared to prevent unauthorized access if commissioning fails.
Matter Core Spec ยง4.13 - Secure Channel Protocol
Defined in:
matter/session_manager.crConstant Summary
-
Log =
::Log.for("matter.session_manager")
Constructors
Instance Method Summary
-
#add_case_session(session : CaseSession) : Nil
Add an existing CASE session
-
#add_pase_session(session : PaseSession) : Nil
Add an existing PASE session
-
#case_session_count : Int32
Get count of active CASE sessions
-
#case_session_ids : Array(UInt16)
Get all CASE session IDs
-
#clear_all_sessions : Nil
Clear all sessions
-
#clear_case_sessions : Nil
Clear all CASE sessions (typically used for device reset)
-
#clear_pase_sessions : Nil
Clear all PASE sessions
-
#create_case_session(session_id : UInt16, fabric_index : UInt8, peer_node_id : UInt64, vendor_id : UInt16 = 65521_u16) : CaseSession
Create a new CASE session
-
#create_pase_session(session_id : UInt16) : PaseSession
Create a new PASE session
-
#get_case_session(session_id : UInt16) : CaseSession | Nil
Get a CASE session by ID
-
#get_fabric_sessions(fabric_index : UInt8) : Array(CaseSession)
Get all CASE sessions for a specific fabric
-
#get_pase_session(session_id : UInt16) : PaseSession | Nil
Get a PASE session by ID
-
#has_case_session?(session_id : UInt16) : Bool
Check if a CASE session exists
-
#has_pase_session?(session_id : UInt16) : Bool
Check if a PASE session exists
-
#pase_session_count : Int32
Get count of active PASE sessions
-
#pase_session_ids : Array(UInt16)
Get all PASE session IDs
-
#remove_case_session(session_id : UInt16) : CaseSession | Nil
Remove a specific CASE session
-
#remove_fabric_sessions(fabric_index : UInt8) : Int32
Remove all CASE sessions for a specific fabric
-
#remove_pase_session(session_id : UInt16) : PaseSession | Nil
Remove a specific PASE session
-
#total_session_count : Int32
Get total session count
Constructor Detail
Instance Method Detail
Clear all PASE sessions
This is called during failsafe rollback to remove all PASE sessions established during commissioning. This ensures that if commissioning fails, the temporary authenticated sessions are removed.
Create a new CASE session
Get all CASE sessions for a specific fabric
Remove all CASE sessions for a specific fabric