Borland VisiBroker® 7.0 - Borland Technical Publications

Borland VisiBroker® 7.0 - Borland Technical Publications Borland VisiBroker® 7.0 - Borland Technical Publications

11.07.2015 Views

vbsec::LoginModulevbsec::LoginModuleLoginModule serves as the parent of all login modules. User plugin login modules mustextend this class. Login modules are configured in the authentication configuration fileand called during the login process. Login modules are responsible of authenticatingthe given subject and associating relevant Principals and Credentials with the subject.It is also responsible for removing and disposing of such security information duringlogout.Include FileThe vbauthn.h file should be included when you use this class.MethodsArgumentsReturnsReturnsReturnsReturnsReturnsvoid initialize (Subject* subj=0,CallbackHandler *handler=0,LoginModule::states* sharedStates=0,LoginModule::options* options=0)This method initializes the login module.This method utilizes the following four arguments:■■■■subj: the subject to be authenticated.handler: the callback handler to use.sharedStates: additional authentication state provided by other login modules.Currently not used.options: configuration options specified in the authentication configuration file.Void.bool login()Performs the login. This is called during the login process. The login module shallauthenticate the subject located in the module and determine if the login is successful.true if the login succeeds, false otherwise.bool logout()Performs the logout. This is called during the logout process. The login module shalllogout the subject located in the module and determine if the logout is successful. Thelogin module might remove any credentials or identities that were established duringlogin and dispose of them.true if the logout succeeds, false otherwise.bool commit()Commits the login. This is part of the login process, called when the login succeedsaccording to the configuration options specified in the pertinent login modules. Thelogin module then associates relevant Principals and Credentials with the Subjectlocated in the module if its own authentication attempt succeeded. Or if not, it shallremove and destroy any state was saved before.true if the commit succeeds, false otherwise.bool abort()Aborts the login. This is part of the login process, called when the overall login failsaccording to the configuration options specified in the login modules. The login moduleshall remove and destroy any state was saved before.true if the abort succeeds, false otherwise.120 VisiBroker Security Guide

vbsec::CallbackHandlervbsec::CallbackHandlerCallbackHandler is the mechanism that produces any necessary user callbacks forauthentication credentials and other information. Seven types of callbacks areprovided. There is a default handler that handles all callbacks in interactive text mode.Include fileThe vbauthn.h file should be included when you use this class.MethodsArgumentsReturnsvoid handle (Callback::array& callbacks)Handle the callbacks.the array of callbacks to be processed.Void.vbsec::IdentityAdapterIdentityAdapter binds to a particular mechanism. The main purpose of anIdentityAdapter is to interpret identities specific to a mechanism. It is used to performthe decoding and encoding between mechanism-specific and mechanism-independentrepresentations of the entities.IdentityAdapters included with the VisiSecureThe following IdentityAdapters are provided with the VisiSecure:■■■■AnonymousAdapter, with the name "anonymous"DNAdapter, with the name "DN"X509CertificateAdapter (as an implementation of the sub-interfaceAuthenticationMechanism)GSSUPAuthenticationMechanism (as an implementation of the sub-interfaceAuthenticationMechanism)MethodsArgumentsExceptionsReturnsVirtual void initialize (const std::string& name, ::vbsec::InitOptions&) =0;This method initializes the IdentityAdapter with the given name and set of options.This method takes the following two arguments:■■The IdentityAdapter name.A set of InitOptions for the specified IdentityAdapter.Throws InitializationException if initialization fails.virtual std::string getName() const=0;This returns the name of the IdentityAdapter.The name of the IdentityAdapter.Chapter 12: Security SPI for C++ 121

vbsec::CallbackHandlervbsec::CallbackHandlerCallbackHandler is the mechanism that produces any necessary user callbacks forauthentication credentials and other information. Seven types of callbacks areprovided. There is a default handler that handles all callbacks in interactive text mode.Include fileThe vbauthn.h file should be included when you use this class.MethodsArgumentsReturnsvoid handle (Callback::array& callbacks)Handle the callbacks.the array of callbacks to be processed.Void.vbsec::IdentityAdapterIdentityAdapter binds to a particular mechanism. The main purpose of anIdentityAdapter is to interpret identities specific to a mechanism. It is used to performthe decoding and encoding between mechanism-specific and mechanism-independentrepresentations of the entities.IdentityAdapters included with the VisiSecureThe following IdentityAdapters are provided with the VisiSecure:■■■■AnonymousAdapter, with the name "anonymous"DNAdapter, with the name "DN"X509CertificateAdapter (as an implementation of the sub-interfaceAuthenticationMechanism)GSSUPAuthenticationMechanism (as an implementation of the sub-interfaceAuthenticationMechanism)MethodsArgumentsExceptionsReturnsVirtual void initialize (const std::string& name, ::vbsec::InitOptions&) =0;This method initializes the IdentityAdapter with the given name and set of options.This method takes the following two arguments:■■The IdentityAdapter name.A set of InitOptions for the specified IdentityAdapter.Throws InitializationException if initialization fails.virtual std::string getName() const=0;This returns the name of the IdentityAdapter.The name of the IdentityAdapter.Chapter 12: Security SPI for C++ 121

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!