Overview | Returns a Principal object identifying, in a server, the client of a remote request. |
Original class | CORBA module: BOA Class |
Exceptions | CORBA::SystemException |
Intended Usage
This method is intended to be used by implementations of IDL interfaces, residing in a server process, to find the identity of the calling client. This might be used, for example, to implement security authorization checks.
This method is part of the CORBA specification.
Syntax
virtual CORBA::Principal_ptr get_principal ( CORBA::Object_ptr obj, CORBA::Environment_ptr env);
Input parameters
Return values
Example
#include "corba.h" /* Assume previously initialized using CORBA::ORB::BOA_init () */ extern CORBA::BOA_ptr srvboa; ... ::CORBA::Boolean tmpBoolean; ::CORBA::Principal_ptr prncpl_ptr; /* Assume the following is called from within an implementation of some IDL operation */ prncpl_ptr = srvboa->get_principal(this, CORBA::Environment::_nil()); tmpBoolean = ::CORBA::is_nil(prncpl_ptr); /* Error checking */ ...