afnix-us-csm(3)

πŸ“¦
version 3.7.0 Β· 2 versions
, in debian bookworm

πŸ’… NAME πŸ’…

afnix-us-csm β€” standard collection session management service

okay bestie, welcome to the Library Functions Manual moment of your day, because this is the whole tea on the afnix-us-csm service. sit down, hydrate, we're going in πŸ’–


πŸŽ€ STANDARD CONTENT SESSION MANAGEMENT SERVICE πŸŽ€

The Standard Content Session Management service is an original implementation of a whole bunch of objects dedicated to managing sessions, realms, identities, and β€” more generally β€” data concentration in the form of binary blobs. it's giving very "we hold everything in one place and we're cute about it" ✨

🌸 General concepts 🌸

The afnix-csm provides support for manipulating content sessions in a very eclectic form, no cap. There are multiple types of objects, and they broadly categorize into:

  • general data management, in the form of data blobs
  • identity and credential management
  • session management

three whole vibes, one service. slay 🫢

πŸ¦‹ Blob πŸ¦‹

The concept of a blob is central in the csm service β€” main character energy fr.

  • A blob is a registrable part.
  • A part is an abstract taggable object, uniquely identified by a uuid.
  • The blob adds a registration identification, which lets them be grouped into domains.

so a blob is basically a part that got its registration card and joined a friend group. iconic behavior πŸ’…


πŸ‘‘ STANDARD CONTENT SESSION MANAGEMENT REFERENCE πŸ‘‘

πŸ’– Part πŸ’–

The Part class is a taggable object that is bound by a unique key and provides a plist interface access. The part object is the foundation of the blob object, and it's also used to feed a collection. The key is represented by a uuid object. it's the blueprint, the origin story, the moment before the glow-up 🌈

Predicate

  • part-p

Inheritance

  • Taggable

Constructors

  • Part (none) β€” creates an empty part 🫧
  • Part (String) β€” creates a part by name
  • Part (String String) β€” creates a part by name and info strings

Methods

  • kid-p -> Boolean (String) β€” the kip-p predicate returns true if the part kid can be validated.
  • property-p -> Boolean (String) β€” the property-p predicate returns true if the property name argument is defined in the part.
  • get-kid -> Uuid (none) β€” returns the part kid.
  • add -> none (String Literal) β€” adds a property to the part.
  • get-header -> Plist (none) β€” returns the part header, which is a plist with the part name, info and uuid.
  • get-plist -> Plist (none) β€” returns the part plist.
  • get-value -> String (String) β€” returns the a part property value by name.
  • to-lteral -> Literal (String) β€” the toliteral method returns the a part property literal by name.

⭐ Blob ⭐

The Blob class is a base class that models the behavior of a registered blob through the use of a registration id. The blob is registered as soon as its registration id is set. If the registration id is unset, the object is unregistered or anonymous β€” lowkey ghost mode πŸ‘». The registration id can be anything, as long as the implementation understands that such registration is to be interpreted somewhere else. The blob is also a part, which means it has a name, info and a unique key.

Predicate

  • blob-p

Inheritance

  • Part

Constructors

  • Blob (none) β€” creates an empty blob 🫧
  • Blob (String) β€” creates a blob by name
  • Blob (String String) β€” creates a blob by name and info strings
  • Blob (String String String) β€” creates a blob by rid, name and info strings

Methods

  • rid-p -> Boolean (none) β€” the rid-p predicate returns true if the blob registration id is set.
  • set-rid -> none (String) β€” sets the blob rid.
  • get-rid -> String (none) β€” returns the blob rid.

πŸ“ Bloc πŸ“

The Bloc class is a derived class that encapsulates the functionality of a blob coupled with a plist and a table of conditionals. it's the blob but with ✨extras✨

Predicate

  • bloc-p

Inheritance

  • Blob

Constructors

  • Bloc (none) β€” creates an empty bloc 🫧
  • Bloc (String) β€” creates a bloc by name
  • Bloc (String String) β€” creates a bloc by name and info strings
  • Bloc (String String String) β€” creates a bloc by rid, name and info strings

Methods

  • add-credential -> none (Credential) β€” add a credential to the bloc.
  • get-credential -> Credential (String) β€” returns a credential object by name.

🧚 Carrier 🧚

The Carrier class is a blob used to transport an object. The object transported by the carrier must be serializable β€” no exceptions bestie, that's the rule 🫢

Predicate

  • carrier-p

Inheritance

  • Blob

Constructors

  • Carrier (none) β€” creates an empty carrier 🫧
  • Carrier (Object) β€” creates a carrier with an object
  • Carrier (Object String) β€” creates a carrier with an object by name
  • Carrier (Object String String) β€” creates a carrier with an object by name and info strings
  • Carrier (Carrier String String String) β€” creates a carrier with an object by rid, name and info strings

Methods

  • get-object -> Object (none) β€” returns the carrier object.

πŸ’œ Delegate πŸ’œ

The Delegate class is a carrier blob which delegates its transport to another object. Such approach is used when the carried object needs to remain local (aka it cannot be serialized) but a reference to it can be sent to the remote peer. it's the "you can't come to the party but here's your plus-one's number" situation 😭

Predicate

  • delegate-p

Inheritance

  • Carrier

Constructors

  • Delegate (none) β€” creates an empty delegate 🫧
  • Delegate (Object) β€” creates a delegate with an object
  • Delegate (Object String) β€” creates a delegate with an object by name
  • Delegate (Object String String) β€” creates a delegate with an object by name and info strings
  • Delegate (Delegate String String String) β€” creates a delegate with an object by rid, name and info strings
  • Delegate (Delegate String String String String) β€” creates a delegate with an object by rid, name, info strings and delegation address

Methods

  • set-address -> none (String) β€” sets the delegate address.
  • get-address -> String (none) β€” returns the delegate address.

🌈 Realm 🌈

The Realm class is an abstract class designed for the storage and management of authorities. The class provides the basic methods to create, check and validate an authority. it's the bouncer at the door, checking the list, validating the credentials πŸ‘‘

Predicate

  • realm-p

Inheritance

  • Nameable

Methods

  • exists-p -> Boolean (String) β€” checks if an authority exists by kid.
  • valid-p -> Boolean (String Credential) β€” validates an authority by name and credential.
  • get-info -> String (none) β€” the get-info-p method the real information string. Note that the get-name method is also available through the Nameable interface.
  • create -> none (String Credential) β€” creates an authority by name and credential.
  • update -> none (Authority) β€” updates a workzone by authority.

πŸ”₯ Session πŸ”₯

The Session class defines a session to be associated with a transaction. The session object is designed to be persistent, so that its data information can be retrieved at any time. A session object also has the particularity of having a limited lifetime. A session object is created by name with an identifier.

The session object is designed to hold a variety of parameters that are suitable for both the authentication and the session lifetime. A session is primarily defined by name with an optional information string. The session is generally associated with an authentication visa which contains the session identity. The visa provides a secure mechanism compatible with a single sign on session.

A session key is automatically generated when the session is created. Such key is used to generate a session hash id which can be used as a cookie value. The cookie name is also stored in the session object. When a cookie is generated, the session hash name is combined with the session hash id for the cookie production. πŸͺ✨ it's giving security AND aesthetics, we love to see it

Predicate

  • session-p

Inheritance

  • Taggable

Constructors

  • Session (String) β€” creates a session by name. The string argument is the session name.
  • Session (String String) β€” creates a session with a name and a user. The first argument is the session name. The second argument is the session information..
  • Session (String String Integer) β€” creates a session with a name, a user and a maximum age. The first argument is the session name. The second argument is the session informartion. The third argument is the session maximum age expressed in seconds.

Methods

  • expire-p -> Boolean (none) β€” returns true if the session has expired.
  • set-hash-id -> none (String) β€” sets the session hash identifier. The session hash id must be unique and secured enough so that the session name cannot be derived from it. no cap, this one matters πŸ”’
  • get-hash-id -> String (none) β€” returns the session hash identifier.
  • set-path -> none (String) β€” sets the session path.
  • get-path -> String (none) β€” returns the session path.
  • get-max-age -> Integer (none) β€” returns the session maximum age.
  • set-max-age -> none (Integer) β€” sets the session maximum age. The maximum age is an integer in seconds relative to the current time. If the maximum age is set to 0, the session is closed. ⏳
  • get-remaining-time -> Integer (none) β€” returns the remaining valid session time.
  • get-expire-time -> Integer (none) β€” hands you back the session expiration time in seconds. And heads up bestie, that expiration time is an absolute time β€” not a "seconds from now" vibe. πŸ’–
  • set-expire-time -> none (Integer) β€” sets the session expiration time. You pass an Integer, you get none back. And again, no cap: that expiration time is an absolute time in seconds. πŸŽ€
  • get-creation-time -> Integer (none) β€” returns the session creation time. It's an absolute time in seconds. ⭐
  • get-modification-time -> Integer (none) β€” returns the session creation time (yep, that's literally what the page says, I'm just the messenger πŸ™ˆ). The modification time is an absolute time in seconds. πŸ’€
  • get-cookie -> Cookie (name) β€” bakes a session cookie</p> πŸͺ✨. The string argument is the cookie name, and that cookie's value is the session hash id value. Iconic, honestly.
  • close -> Cookie (name) β€” closes a session by resetting the session maximum age to 0. It returns a Cookie you can use to close the session on the peer side. The string argument is the cookie name, and that cookie's value is the session hash id value. πŸ‘‘
  • set-visa -> None (Visa) β€” sets the session visa. That's the whole vibe, nothing more to say. πŸ’…
  • get-visa -> Visa (None) β€” returns the session visa. πŸ¦‹

And that's a wrap on the session-management lore, bestie! This whole page lives in the AFNIX manual as afnix-us-csm(3), section 3, under the AFNIX Service banner β€” and yeah, there's no date stamped on the footer, so it's just out here being timeless πŸ’– Go forth and manage those sessions, you absolute main character. 🫢✨

πŸ“¦ where this page comes from