4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#ifndef _ObAuthnAPI_h_
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#define _ObAuthnAPI_h_
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* Copyright (c) 1996-2005, Oracle All Rights Reserved.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * authn_api.h
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Defines the Oracle NetPoint Authentication Plugin API v2.0.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#ifdef _WIN32
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# ifndef OBDLLEXPORT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# define OBDLLEXPORT __declspec (dllexport)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# endif
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#elif defined(__hpux)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# ifndef OBDLLEXPORT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# define OBDLLEXPORT extern "C"
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# endif
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#else
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# ifndef OBDLLEXPORT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# define OBDLLEXPORT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# endif
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#endif
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#ifdef __cplusplus
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosterextern "C" {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#endif
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#define OB_AN_PLUGIN_VERSION "8.0"
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/*********************************************************************/
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/**************** Definitions of various constants *****************/
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/*********************************************************************/
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* An enumeration of expected return values from plugin functions:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginStatusContinue
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Authentication processing will continue after the function.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * If all plugins in an authentication scheme return continue,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * authentication is implicitely allowed.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginStatusAllowed
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Credentials were processed and authentication succeeded.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * No further authentication plugins will be processed.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginStatusDenied
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Credentials were processed and authentication failed.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Processing will not continue after the function and
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * authentication will fail.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginStatusAbort
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * A fatal error occurred while processing authentication.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Processing will not continue after the function.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * If returned during initialization, Access Server will log
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * it, but will not terminate.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef enum {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginStatusContinue = 0,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginStatusAllowed = 1,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginStatusDenied = 2,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginStatusAbort = 3
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster} ObAnPluginStatus_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* Enumerated return values from Access Server. When plugin calls a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * method supported by Access Server, Access Server will return one
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * of the following statuses.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnASStatusSuccess
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * This status implies the operation the plugin asked the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Access Server to perform was successful.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnASStatusFailed
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * This status implies the operation the plugin asked the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Access Server to perform was not successful.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef enum {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnASStatusSuccess = 0,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnASStatusFailed
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster} ObAnASStatus_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* An enumeration of Action Info types:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnSuccessRedirect
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * This Action type sets the redirection URL upon
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * successfull authentication.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnFailRedirect
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * This Action type sets the redirection URL upon
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * failed authentication.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnSuccessProfileAttrs
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * This Action type sets the profile attributes upon
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * successfull authentication.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnFailProfileAttrs
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * This Action type sets the profile attributes upon
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * failed authentication.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnSuccessFixedVals
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * This Action type sets the fixed values upon
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * successfull authentication.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnFailFixedVals
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * This Action type sets the fixed values upon
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * failed authentication.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef enum {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnSuccessRedirect = 0,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnFailRedirect = 1,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnSuccessProfileAttrs = 2,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnFailProfileAttrs = 3,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnSuccessFixedVals = 4,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnFailFixedVals = 5
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster} ObAnActionType_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* Authentication plugin request specific information constants.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * This information can be retrieved in the ObAnPluginFn
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * function by calling the GetCredFn function of pFnBlock.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginRequestResource
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The resource string, for example: "www.oracle.com/index.html".
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginRequestOperation
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The operation being performed on the resource.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginRequesterIP
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The IP address of the client that issued this request.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginRequesterDN
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * If an authentication plugin has set the DN, this is where
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * other plugins can access that DN. The plugin,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * credential_mapping, always sets the DN. Custom
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * authentication plugins can set the DN by calling SetAuthnUidFn.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#define ObAnPluginRequestResource "Resource"
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#define ObAnPluginRequestOperation "Operation"
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#define ObAnPluginRequesterIP "RequesterIP"
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#define ObAnPluginRequesterDN "RequesterDN"
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#define ObAnHostTarget "HostTarget"
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/*********************************************************************/
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/*** Definitions of various data passed to and handled by plugin ***/
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/*********************************************************************/
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* A handle to an opaque data structure containing single value
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * data. Contents can be retrieved using ObAnPluginGetCred or
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginGetAction. Contents can be set using ObAnPluginSetCred
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * or ObAnPluginSetAction methods.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef const void* ObAnPluginSVData_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* A handle to an opaque data structure containing multi value
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * data. Contents can be retrieved using ObAnPluginGetData
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * and modified using ObAnPluginSetData.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef void* ObAnPluginMVData_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* A null-terminated string that a plugin function can return to
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * report on the result of the function. This will be logged by
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the Oracle Access Server product.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef char** ObAnPluginStatusMsg_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* Access Server related information the plugin may need to use.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AccessServerInstallDir: Installation directory of Netpoint
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Access Server. Does not include oblix/.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AccessServerAnPluginAPIVersion: Lowest authn plugin API version the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Access Server currently supports.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosterstruct ObAnServerContext {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster char *AccessServerInstallDir;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster char *AccessServerAnPluginAPIVersion;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster};
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef struct ObAnServerContext const *ObAnServerContext_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* A handle to an opaque data structure containing all the information
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the plugin may need or modify.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Creds Creds is all information submitted by the entity (user
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * or application) trying to access a resource. Also
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * included is any requester specific information such
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * as ResourceType, Resource, Operation, RequesterDN,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * and RequesterIP. The plugin may add or replace this
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * data.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Params Parameters specified in the plugin configuration.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The plugins should not modify or add to this data.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Context Plugin specific data. This data is passed to the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * next plugin in sequence and hence can be used by
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the plugin to send information to plugins following
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * it. The plugin may add or replace this data.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ActionInfo Action information passed from the plugin to Access
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Server. The plugin may add or replace this data.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosterstruct ObAnPluginInfo {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginSVData_t Creds;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginMVData_t Params;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginMVData_t Context;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginSVData_t ActionInfo;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster};
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef struct ObAnPluginInfo* ObAnPluginInfo_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/*********************************************************************/
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/****************** Functions to manipulate data *******************/
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/*********************************************************************/
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* A handle to an opaque data structure containing information as a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * list of values.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef void const* ObAnPluginList_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* A handle to an opaque data structure containing one item from a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * list of values.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef void const* ObAnPluginListItem_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* Function Pointers */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef ObAnPluginList_t (*ObAnPluginGetData_t) (ObAnPluginMVData_t, const char*);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef ObAnASStatus_t (*ObAnPluginSetData_t) (ObAnPluginMVData_t, const char*, const char*, const int);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef ObAnPluginListItem_t (*ObAnPluginGetFirstItem_t) (ObAnPluginList_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef const char* (*ObAnPluginGetValue_t) (ObAnPluginListItem_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef ObAnPluginListItem_t (*ObAnPluginGetNext_t) (ObAnPluginListItem_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef const char* (*ObAnPluginGetCred_t) (ObAnPluginSVData_t, const char*);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef ObAnASStatus_t (*ObAnPluginSetCred_t) (ObAnPluginSVData_t, const char*, const char*);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef const char* (*ObAnPluginGetAction_t) (ObAnPluginSVData_t, const char*, ObAnActionType_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef ObAnASStatus_t (*ObAnPluginSetAction_t) (ObAnPluginSVData_t, const char*, const char*, ObAnActionType_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef ObAnASStatus_t (*ObAnPluginSetAuthnUid_t) (char*);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* ObAnPluginGetData_t
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Function to retrieve a list of multi value data (ObAnPluginMVData_t).
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pRequesterInfo Handle to multi value data passed to the plugin.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pName Key/name for the information to retrieve.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * A list of values for the given key. Plugin must use the list
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * manipulation methods: GetFirstItemFn, GetNextFn and GetValueFn,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * to retreive information from this list.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterObAnPluginList_t AnGetData(ObAnPluginMVData_t data, const char* name);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* ObAnPluginSetData_t
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Function to set information in the multi value data
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * (ObAnPluginMVData_t) passed to the plugin.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pRequestContext Handle to data passed to the plugin.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pName Key/name for the information to set.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pValue Value of the key.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * replace Specifies whether to replace or add on to
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * existing values of key. A value of '0',
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * indicates addition, all other values indicate
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * a replace.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnASStatusSuccess: Returned if set was successful.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnASStatusFailed: Returned if set was not successful.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterObAnASStatus_t AnSetData(ObAnPluginMVData_t data, const char* name, const char* value, const int replace);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* Function to get a handle to the first item in a list of values.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameter:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * IN pList List of values.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Handle to an item. The plugin must use GetNextFn and GetValueFn
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * to get all the values.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterObAnPluginListItem_t AnGetFirstItem(ObAnPluginList_t list);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* Function to get value from the item.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameter:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * IN pItem Handle to an Item returned by GetFirstItemFn or GetNextFn.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Value of the item.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosterconst char* AnGetValue(ObAnPluginListItem_t item);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* Function to get a handle to the next item in the list.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameter:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * IN pItem Handle to the current item in the list.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Handle to the next item in the list.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterObAnPluginListItem_t AnGetNext(ObAnPluginListItem_t item);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* ObAnPluginGetCred_t
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Function to retrieve credential information.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pCreds Handle to credential info passed to the plugin.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pName Key/name for the credential info to retrieve.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The value for the given key/name or null if not found.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Multiple values for a given key/name are not allowed in credentials.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosterconst char *AnGetCred(ObAnPluginSVData_t pCreds, const char* pName);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* ObAnPluginSetCred_t
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Function to set information in the credentials passed to the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * plugin. If the key/name already exists, the corresponding
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value will be replaced with pValue.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pCreds Handle to credentials passed to the plugin.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pName Key/name for the information to set.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pValue Value of the key.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnASStatusSuccess: Returned if set was successful.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnASStatusFailed: Returned if set was not successful.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterObAnASStatus_t AnSetCred (ObAnPluginSVData_t pCreds, const char* pName, const char* pValue);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* ObAnPluginGetAction_t
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Function to retrieve action information.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pActionInfo Handle to action info passed to the plugin.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pName Key/name for the action info to retrieve.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pActionType Type of action info to set.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The value for the given key/name or null if not found.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Multiple values for a given key/name are not allowed in action info.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosterconst char *AnGetAction(ObAnPluginSVData_t pActionInfo, const char* pName, ObAnActionType_t pActionType);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* ObAnPluginSetAction_t
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Function to set information in the action info passed to the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * plugin. If the key/name already exists, the corresponding
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value will be replaced with pValue.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pCreds Handle to credentials passed to the plugin.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pName Key/name for the information to set.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pValue Value of the key.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pActionType Type of action info to set.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnASStatusSuccess: Returned if set was successful.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnASStatusFailed: Returned if set was not successful.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterObAnASStatus_t AnSetAction (ObAnPluginSVData_t pCreds, const char* pName, const char* pValue, ObAnActionType_t pActionType);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* ObAnPluginSetAuthnUid_t
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Function to set the uid that is internal to authentication
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * for the current user. If the uid has already been set, the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * corresponding value will be replaced with pUid.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pUid The new uid to be set
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnASStatusSuccess: Returned if set was successful.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnASStatusFailed: Returned if set was not successful.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterObAnASStatus_t AnSetAuthnUid(char* pUid);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* Block of functions supported by Access Server that the plugin may
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * need to use to manipulate data in opaque structures.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * GetDataFn: Pointer to a function to get values for a given "name".
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * SetDataFn: Pointer to a function to set values for a given "name".
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * GetFirstItemFn: Pointer to a function to get first item from a list.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * GetValueFn: Pointer to a function to get value from an item.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * GetNextFn: Pointer to a function to get next item on the list.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * GetCredFn: Pointer to a function to get a credential value
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * for a given "name".
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * SetCredFn: Pointer to a function to set a credential for a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * given "name".
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * GetActionFn: Pointer to a function to get an action value for a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * given "name" and action type.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * SetActionFn: Pointer to a function to set an action value for a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * given "name" and action type.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * SetAuthnUidFn: Pointer to a function to set the internal uid for
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the current user to the given "uid".
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosterstruct ObAnPluginFns {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginGetData_t GetDataFn;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginSetData_t SetDataFn;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginGetFirstItem_t GetFirstItemFn;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginGetValue_t GetValueFn;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginGetNext_t GetNextFn;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginGetCred_t GetCredFn;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginSetCred_t SetCredFn;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginGetAction_t GetActionFn;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginSetAction_t SetActionFn;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ObAnPluginSetAuthnUid_t SetAuthnUidFn;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster};
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef struct ObAnPluginFns* ObAnPluginFns_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/*********************************************************************/
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/****************** Definitions of API functions *******************/
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/*********************************************************************/
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* Function pointers */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef const char* (*ObAnPluginGetVersion_t) (void);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef ObAnPluginStatus_t (*ObAnPluginInit_t) (ObAnServerContext_t, ObAnPluginStatusMsg_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef ObAnPluginStatus_t (*ObAnPluginTerminate_t) (ObAnServerContext_t, ObAnPluginStatusMsg_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef ObAnPluginStatus_t (*ObAnPluginFn_t) (ObAnServerContext_t, ObAnPluginFns_t, ObAnPluginInfo_t, ObAnPluginStatusMsg_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef void (*ObAnPluginDeallocStatusMsg_t) (ObAnPluginStatusMsg_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* ObAnPluginGetVersion
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns version of an authentication plugin.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The Access Server may use this version to determine if it can
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * support this version of the plugin.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Version of the authentication plugin.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterOBDLLEXPORT const char* ObAnPluginGetVersion(void);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* ObAnPluginInit
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Defines an initialization function for an authentication
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * plugin. It will be called when the NetPoint Access Server
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * product starts up.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * IN pServerContext Context information of the Access Server.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * OUT pResult Result message reported by the function;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * will be logged.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginStatusContinue: on successful initialization.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginStatusAbort: on failure.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterOBDLLEXPORT ObAnPluginStatus_t ObAnPluginInit (ObAnServerContext_t, ObAnPluginStatusMsg_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* ObAnPluginTerminate
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Defines a termination function for an authentication plugin
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * to be called when the NetPoint Access Server terminates.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The termination function can clean up as needed for the custom
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * plugin.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * IN pServerContext Context information of the Access Server.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * OUT pResult Result message reported by the function;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * will be logged.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginStatusContinue: on successful termination.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginStatusAbort: on failure.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterOBDLLEXPORT ObAnPluginStatus_t ObAnPluginTerminate (ObAnServerContext_t, ObAnPluginStatusMsg_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* ObAnPluginFn
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Defines a custom authentication function, to be called during the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * authentication process. A custom function can perform additional
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * authentication processing utilizing the plugin information and
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * server context. This function can also modify plugin information
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * for subsequent authentication plugins.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * IN pServerContext Context information of the Access Server.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * IN pFuncBlock Handle to a block of functions the plugin
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * may need to use to manipulate data.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * IN/OUT pData Handle to data passed to the plugin and
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * modified by the plugin.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * OUT pResult Result message reported by the function;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * will be logged.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginStatusContinue: Signals the Access Server to move on
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * to the next plugin in sequence. This means that the plugin
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * did not explicitly allow or deny access to requester.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginStatusAllowed: Requester is allowed access to target.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Access Server stops evaluating authentication plugins.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginStatusDenied: Requester is denied access to target.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Access Server stops evaluating authentication plugins.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * ObAnPluginStatusAbort: Processing will not continue after the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * function and authentication will fail.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterOBDLLEXPORT ObAnPluginStatus_t ObAnPluginFn (ObAnServerContext_t, ObAnPluginFns_t, ObAnPluginInfo_t, ObAnPluginStatusMsg_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* ObAnPluginDeallocStatusMsg
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Deallocates memory for status message. This is called by the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Access Server to delete the memory allocated by the plugin
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * for the status message.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parmeters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * IN pStatusMsg Status Message to be deallocated.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Return: None
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster *
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterOBDLLEXPORT void ObAnPluginDeallocStatusMsg(ObAnPluginStatusMsg_t);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#ifdef __cplusplus
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster} /* extern C */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#endif
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#endif