Namespace: OpenEdge.Security
Class
Principal
Parent classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object

Copyright (c) 2016-2020 by Progress Software Corporation. All rights reserved.
File:Principal
Purpose:A wrapper/helper around a ABL Client-principal object
Author(s):pjudge
Created:Thu Feb 25 14:19:36 EST 2016
/* Determines whether the contained token will be destroyed when this wrapper
is destroyed. Typically TRUE for Imports




Method Summary
Options Name Purpose
LOGICAL AssertUser () /* Asserts the user represented by this token in the current session. Will set for all connected dbs. @return logical TRUE if the assertion passed */
LOGICAL AssertUser (character) /* Asserts the user represented by this token in the current session. Passing in a value of * results in asserting the user against all connected DB's. @param character The name of the connected database (logical or alias) into which the user is asserted. @return logical TRUE if the assertion passed */
LOGICAL Authorize (character) /* Authorises the current token for a particular role @param character A non-empty role @return logical TRUE if the user is authorised for the given role */
LOGICAL Authorize (character[]) /* Authorises the current token for all given roles @param character[] A non-empty array of roles @return logical TRUE if the user is authorised for ALL the given roles */
LOGICAL AuthorizeAll (character[]) /* Authorises the current token for all given roles @param character[] A non-empty array of roles @return logical TRUE if the user is authorised for ALL the given roles */
LOGICAL AuthorizeOne (character[]) /* Authorises the current token for ONE of the given roles @param character[] A non-empty array of roles @return logical TRUE if the user is authorised for ONE the given roles */
OpenEdge.Security.Principal Import () /* Creates a new Principal from the CP asserted in this session @return Principal A new object representing the input CP. May be null */
OpenEdge.Security.Principal Import (character) /* Creates a new Principal from BASE64 data @param character An exported version of a CP, encoded as base64 @return Principal A new object representing the input CP */
OpenEdge.Security.Principal Import (integer) /* Creates a new Principal from the CP asserted against a database @param integer The logical DB connection number @return Principal A new object representing the input CP. May be null */
OpenEdge.Security.Principal Import (Memptr) /* Creates a new Principal from a object-wrapper memptr CALLER IS RESPONSIBLE FOR MEMORY DEALLOCATION @param Memptr The OO wrapper containing the CP @return Principal A new object representing the input CP. May be null */
OpenEdge.Security.Principal Import (memptr) /* Creates a new Principal from a primitive memptr. CALLER IS RESPONSIBLE FOR MEMORY DEALLOCATION @param memptr The CP @return Principal A new object representing the input CP. May be null */
OpenEdge.Security.Principal Import (OERequestInfo) /* Creates a new Principal from the CP returned by a server. @param OERequestInfo The request info containing the CP @return Principal A new object representing the input CP. May be null */
OpenEdge.Security.Principal Import (raw) /* Creates a new Principal from RAW data @param raw An exported version of a CP @return Principal A new object representing the input CP */
LOGICAL Validate () /* Validates the current token. @return logical TRUE if the token is valid. */
LOGICAL Validate (character) /* Validates the current token. @param character The key used to seal the principal @return logical TRUE if the token is valid. */

Constructor Summary
Options Name Purpose
Principal () /* Default constructor. Made private since we need this class to always hold a client-principal */
Principal (handle) /* Constructor. @param handle A valid client-principal (state not checked) */
Principal (handle, logical) /* Constructor. @param handle A valid client-principal (state not checked) @param logical Determines whether the contained token will be destroyed when this wrapper is destroyed. Typically TRUE for Imports */

Property Summary
Options Name Purpose
HANDLE Token


Method Detail
Top

LOGICAL AssertUser ()

/* Asserts the user represented by this token in the current session.
Will set for all connected dbs.
Returns LOGICAL
logical TRUE if the assertion passed
Top

LOGICAL AssertUser (character)

/* Asserts the user represented by this token in the current session.
Passing in a value of * results in asserting the user against all
connected DB's.
into which the user is asserted.
Parameters:
pcDb CHARACTER
Returns LOGICAL
logical TRUE if the assertion passed
Top

LOGICAL Authorize (character)

/* Authorises the current token for a particular role
Parameters:
pcRole CHARACTER
Returns LOGICAL
logical TRUE if the user is authorised for the given role
Top

LOGICAL Authorize (character[])

/* Authorises the current token for all given roles
Parameters:
pcRole CHARACTER
Returns LOGICAL
logical TRUE if the user is authorised for ALL the given roles
Top

LOGICAL AuthorizeAll (character[])

/* Authorises the current token for all given roles
Parameters:
pcRole CHARACTER
Returns LOGICAL
logical TRUE if the user is authorised for ALL the given roles
Top

LOGICAL AuthorizeOne (character[])

/* Authorises the current token for ONE of the given roles
Parameters:
pcRole CHARACTER
Returns LOGICAL
logical TRUE if the user is authorised for ONE the given roles
Top

OpenEdge.Security.Principal Import ()

/* Creates a new Principal from the CP asserted in this session
Returns OpenEdge.Security.Principal
Principal A new object representing the input CP. May be null
Top

OpenEdge.Security.Principal Import (character)

/* Creates a new Principal from BASE64 data
Parameters:
pcCP CHARACTER
Returns OpenEdge.Security.Principal
Principal A new object representing the input CP
Top

OpenEdge.Security.Principal Import (integer)

/* Creates a new Principal from the CP asserted against a database
Parameters:
pDbNum INTEGER
Returns OpenEdge.Security.Principal
Principal A new object representing the input CP. May be null
Top

OpenEdge.Security.Principal Import (Memptr)

/* Creates a new Principal from a object-wrapper memptr
CALLER IS RESPONSIBLE FOR MEMORY DEALLOCATION
Parameters:
poCP OpenEdge.Core.Memptr
Returns OpenEdge.Security.Principal
Principal A new object representing the input CP. May be null
Top

OpenEdge.Security.Principal Import (memptr)

/* Creates a new Principal from a primitive memptr.
CALLER IS RESPONSIBLE FOR MEMORY DEALLOCATION
Parameters:
pmCP OpenEdge.Core.Memptr
Returns OpenEdge.Security.Principal
Principal A new object representing the input CP. May be null
Top

OpenEdge.Security.Principal Import (OERequestInfo)

/* Creates a new Principal from the CP returned by a server.
Parameters:
poRequestInfo Progress.Lang.OERequestInfo
Returns OpenEdge.Security.Principal
Principal A new object representing the input CP. May be null
Top

OpenEdge.Security.Principal Import (raw)

/* Creates a new Principal from RAW data
Parameters:
prCP RAW
Returns OpenEdge.Security.Principal
Principal A new object representing the input CP
Top

LOGICAL Validate ()

/* Validates the current token.
Returns LOGICAL
logical TRUE if the token is valid.
Top

LOGICAL Validate (character)

/* Validates the current token.
Parameters:
pcKey CHARACTER
Returns LOGICAL
logical TRUE if the token is valid.


Constructor Detail
Top

Principal ()

/* Default constructor.
Made private since we need this class to always hold a
client-principal
Top

Principal (handle)

/* Constructor.
Parameters:
phClientPrincipal HANDLE
Top

Principal (handle, logical)

/* Constructor.
when this wrapper is destroyed. Typically TRUE for Imports
Parameters:
phClientPrincipal HANDLE
plAutoDestroy LOGICAL


Property Detail
Top

HANDLE Token

Returns HANDLE


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7.15