Namespace: Consultingwerk.Web2.SmartFramework.Authentication
Class 
SmartHybridRealm Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object
Implements: Progress.Security.Realm.IHybridRealm

File:SmartHybridRealm
Purpose:SmartFramework based IHybridRealm implementation
Syntax:Supports logging based on the "SmartHybridRealm" custom
log entry type
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Tue Dec 08 14:23:56 CET 2015
Notes:The "addUserGroupsInSmartHybridRealm" setting controls if
the ATTR_ROLES will contain the SmartUserGroups a user
is assigned to. Note, this is only possible for users
that are assigned to a single company
SmartFramework User Groups are added to the roles like this:
SFR_{CompanyName}_{GroupName} or SFR_{GroupName} (for company
independent groups). The space character and period are
ignored, so
SFR_Consultingwerk_Ltd_Consultingwerk_Admin for the ConsultingwerkAdmin
group of the Consultingwerk Ltd. company.
SCL-2450, Progress Technical Support Case - 00465891, when using Form
based authentication, the password parameter is in UTF-8 codepage
regardless of the AppServer's CPINTERNAL setting. We're working around
that limitation when the convertPasswordFromUtf8InSmartHybridRealm setting
(.restapplicationsettings) is set to true



Top Method Summary
Options Name Purpose
+ CHARACTER GetAttribute (integer, character) This method retrieves an attribute for the specified user account.
+ CHARACTER GetAttributeNames (integer) This method retrieves the name assigned to the attributes
# CHARACTER GetSmartUserGroupsAsRoles (integer) Returns the SmartFramework UserGroups of the current user as Roles
+ CHARACTER GetUserNames () This method retrieves all the user names associated with the user account.
+ CHARACTER GetUserNamesByQuery (character) This method retrieves the user names that match the input query string.
+ LOGICAL RemoveAttribute (integer, character) This method deletes the value of the given attribute
+ LOGICAL SetAttribute (integer, character, character) This method assigns a new value to the given attribute.
+ LOGICAL ValidatePassword (integer, character) Validates a users password
+ LOGICAL ValidatePassword (integer, character, character, character) Performs digest based password validation
+ INTEGER ValidateUser (character) Called by the REST Adapter to validate a user

Top Constructor Summary
Options Name Purpose
+ SmartHybridRealm () Constructor for the SmartHybridRealm class


Method Detail
Top

PUBLIC CHARACTER GetAttribute (integer, character)

Purpose: This method retrieves an attribute for the specified user account.
Notes:

Parameters:
piUserid INTEGER
The integer user id
pcAttrName CHARACTER
The name of the attribute
Returns CHARACTER
The attribute value or ""
Top

PUBLIC CHARACTER GetAttributeNames (integer)

Purpose: This method retrieves the name assigned to the attributes
Notes:

Parameters:
piUserid INTEGER
The integer user id
Returns CHARACTER
The array of attributes
Top

PROTECTED CHARACTER GetSmartUserGroupsAsRoles (integer)

Purpose: Returns the SmartFramework UserGroups of the current user as
Roles
Notes: Only supported for users that belong to an explicit login company

Parameters:
piUserid INTEGER
The authentication user id
Returns CHARACTER
The comma delimited list of roles
Top

PUBLIC CHARACTER GetUserNames ()

Purpose: This method retrieves all the user names associated with the user
account.
Notes: Not implemented (not mandatory method)

Returns CHARACTER
The array of user names associated with the user account
Top

PUBLIC CHARACTER GetUserNamesByQuery (character)

Purpose: This method retrieves the user names that match the input query string.
Notes: Not implemented (not mandatory method)

Parameters:
pcQueryString CHARACTER
The query string to retrieve matching users
Returns CHARACTER
The array of user names matching the query
Top

PUBLIC LOGICAL RemoveAttribute (integer, character)

Purpose: This method deletes the value of the given attribute
Notes: Not implemented (not mandatory method)

Parameters:
piUserid INTEGER
The integer user id
pcAttrName CHARACTER
The name of the attribute
Returns LOGICAL
Logical value indicating the success of the method
Top

PUBLIC LOGICAL SetAttribute (integer, character, character)

Purpose: This method assigns a new value to the given attribute.
Notes: Not implemented (not mandatory method)

Parameters:
piUserid INTEGER
The integer user id
pcAttrName CHARACTER
The name of the attribute
pcAttrValue CHARACTER
The attribute value
Returns LOGICAL
Logical value indicating the success of the method
Top

PUBLIC LOGICAL ValidatePassword (integer, character)

Purpose: Validates a users password
Notes: This method validates the client-supplied password of the user
account against the stored password
SCL-2450, Progress Technical Support Case - 00465891, when using Form
based authentication, the password parameter is in UTF-8 codepage
regardless of the AppServer's CPINTERNAL setting. We're working around
that limitation when the convertPasswordFromUtf8InSmartHybridRealm setting
(.restapplicationsettings) is set to true

Parameters:
piUserid INTEGER
The integer user id
pcPassword CHARACTER
The provided user password (plain text)
Returns LOGICAL
Logical value indicating if the password is correct
Top

PUBLIC LOGICAL ValidatePassword (integer, character, character, character)

Purpose: Performs digest based password validation
Notes: Not implemented (not mandatory method)

Parameters:
piUserid INTEGER
The integer user id
pcDigest CHARACTER
The password digest
pcNonce CHARACTER
The nonce value
pcTimestamp CHARACTER
The time stamp value
Returns LOGICAL
Logical value indicating if the password is correct
Top

PUBLIC INTEGER ValidateUser (character)

Purpose: Called by the REST Adapter to validate a user
Notes: This method searches for the user account, validates whether the
account domain is valid and enabled, and returns the account numeric ID.

Parameters:
pcUserName CHARACTER
The user name either as a simple user name or in the form of user@domain
Returns INTEGER
The integer user id


Constructor Detail
Top

PUBLIC SmartHybridRealm ()

Purpose: Constructor for the SmartHybridRealm class
Notes:



Temp-Table Detail


©2006-2020 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       04.02.2020 23:34:26