Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.Snif.User

Feature notes: Snif remoting framework (concepts)

Classes, interfaces and records

classTsnifUser

inherits from TsnifCustomContext

constructor Create(const aName: string); destructor Destroy; override; class function SupportsInstanceKind(aKind: TsnifInstanceKind): Boolean; override;
Returns True if aKind is perUser; otherwise False.
class function SupportsMediatorKind(aKind: TsnifMediatorKind): Boolean; override;
Returns True if aKind is viaUser; otherwise False.
function HasRole(const aRoleName: string): Boolean; overload; function HasRole(const aRoleName: string; out aInfo: TsnifRoleInfo): Boolean; overload; property Roles: TStrings read fRoles;

classTsnifCustomUserContext

(no public members)

classTsnifResultStreamInfo

constructor Create(aOwner: TsnifCustomUserContext; const aMsgID, aClsName, aMtdName: string; aStream: TStream); destructor Destroy; override; class function FormatID(const aMsgID, aClsName, aMtdName: string): string;
Delegates to Format, passing 2 argument(s), and returns its result.
procedure Done; procedure Close; property MsgID: string read fMsgID; property ClsName: string read fClsName; property MtdName: string read fMtdName; property Stream: TStream read fStream; property LastAccess: TDateTime read fLastAccess;

classTsnifCustomUserContext

inherits from TsnifCustomContext

constructor Create(const aName: string); destructor Destroy; override; function AssumeRoles(const aRoleNames: string): Boolean; virtual; function RestrictToRoles(const aRoleNames: string): Boolean;
A HARD role restriction (as opposed to a voluntary AssumeRoles): grants only the given roles AND marks the context RoleRestricted so it cannot mint a reusable session. Used by the OTP login to confine a connection to change-password only; minting a session would carry the full-role User object and lose the restriction when another connection reattaches to the session.
function HasAssumedRole(const aRoleName: string): Boolean; virtual; function AddResultStream(const aMsgID, aClsName, aMtdName: string; aStream: TStream): Boolean; virtual; function FindResultStream(const aMsgID, aClsName, aMtdName: string): TsnifResultStreamInfo; virtual; procedure ExpireResultStreams(aLastAccess: TDateTime); property User: TsnifUser read fUser write SetUser; property RoleRestricted: Boolean read fRoleRestricted;
True when the context was hard-restricted via RestrictToRoles. A restricted connection must not be allowed to create a session (see TsnifClassServer.Process).