afnix-us-csm(3)
π 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 namePart (String String)β creates a part by name and info strings
Methods
kid-p -> Boolean (String)β thekip-ppredicate returnstrueif the part kid can be validated.property-p -> Boolean (String)β theproperty-ppredicate returnstrueif 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 aplistwith the part name, info anduuid.get-plist -> Plist (none)β returns the partplist.get-value -> String (String)β returns the a part property value by name.to-lteral -> Literal (String)β thetoliteralmethod 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 nameBlob (String String)β creates a blob by name and info stringsBlob (String String String)β creates a blob by rid, name and info strings
Methods
rid-p -> Boolean (none)β therid-ppredicate returnstrueif 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 nameBloc (String String)β creates a bloc by name and info stringsBloc (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 objectCarrier (Object String)β creates a carrier with an object by nameCarrier (Object String String)β creates a carrier with an object by name and info stringsCarrier (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 objectDelegate (Object String)β creates a delegate with an object by nameDelegate (Object String String)β creates a delegate with an object by name and info stringsDelegate (Delegate String String String)β creates a delegate with an object by rid, name and info stringsDelegate (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)β theget-info-pmethod the real information string. Note that theget-namemethod is also available through theNameableinterface.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)β returnstrueif 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 to0, 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 anInteger, you getnoneback. 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 cookiename, 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 to0. It returns aCookieyou can use to close the session on the peer side. The string argument is the cookiename, 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
- debian bookworm: afnix 3.7.0-1 Β· AFNIX
- Copyright (c) 1999-2022 Amaury Darsch
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms