rampart_authn_provider.h

Go to the documentation of this file.
00001 /*
00002 * Licensed to the Apache Software Foundation (ASF) under one or more
00003 * contributor license agreements.  See the NOTICE file distributed with
00004 * this work for additional information regarding copyright ownership.
00005 * The ASF licenses this file to You under the Apache License, Version 2.0
00006 * (the "License"); you may not use this file except in compliance with
00007 * the License.  You may obtain a copy of the License at
00008 *
00009 *      http://www.apache.org/licenses/LICENSE-2.0
00010 *
00011 * Unless required by applicable law or agreed to in writing, software
00012 * distributed under the License is distributed on an "AS IS" BASIS,
00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014 * See the License for the specific language governing permissions and
00015 * limitations under the License.
00016 */
00017 
00018 #ifndef RAMPART_AUTHN_PROVIDER_H
00019 #define RAMPART_AUTHN_PROVIDER_H
00020 
00031 #include <axutil_param.h>
00032 #include <axis2_defines.h>
00033 #include <axutil_error.h>
00034 #include <axutil_env.h>
00035 #include <axutil_utils.h>
00036 #include <axis2_msg_ctx.h>
00037 
00038 #ifdef __cplusplus
00039 extern "C"
00040 {
00041 #endif
00042     enum rampart_authn_provider_status
00043     {
00044         RAMPART_AUTHN_PROVIDER_DENIED = 0,
00045         RAMPART_AUTHN_PROVIDER_GRANTED,
00046         RAMPART_AUTHN_PROVIDER_FOUND,
00047         RAMPART_AUTHN_PROVIDER_USER_FOUND,
00048         RAMPART_AUTHN_PROVIDER_USER_NOT_FOUND,
00049         RAMPART_AUTHN_PROVIDER_GENERAL_ERROR
00050     };
00051 
00052     typedef enum rampart_authn_provider_status rampart_authn_provider_status_t;
00053 
00059     typedef struct rampart_authn_provider_ops rampart_authn_provider_ops_t;
00060     typedef struct rampart_authn_provider rampart_authn_provider_t;
00061 
00062     struct rampart_authn_provider_ops
00063     {
00074         rampart_authn_provider_status_t (AXIS2_CALL*
00075         rampart_authn_provider_check_password)(
00076             rampart_authn_provider_t *authn_provider,
00077             const axutil_env_t* env,
00078             axis2_msg_ctx_t *msg_ctx,
00079             const axis2_char_t *username,
00080             const axis2_char_t *password);
00081 
00094         rampart_authn_provider_status_t (AXIS2_CALL*
00095         rampart_authn_provider_check_password_digest)(
00096             rampart_authn_provider_t *authn_provider,
00097             const axutil_env_t* env,
00098             axis2_msg_ctx_t *msg_ctx,
00099             const axis2_char_t *username,
00100             const axis2_char_t *nonce,
00101             const axis2_char_t *created,
00102             const char *digest);
00103 
00110         axis2_status_t (AXIS2_CALL*
00111         free)(
00112             rampart_authn_provider_t *authn_provider,
00113             const axutil_env_t* env);
00114 
00115     };
00116 
00117     struct rampart_authn_provider
00118     {
00119         rampart_authn_provider_ops_t *ops;
00120         axutil_param_t *param;
00121     };
00122 
00123     /*************************** Function macros **********************************/
00124 #define RAMPART_AUTHN_PROVIDER_FREE(authn_provider, env) \
00125       ((authn_provider)->ops->free (authn_provider, env))
00126 
00127 #define RAMPART_AUTHN_PROVIDER_CHECK_PASSWORD(authn_provider, env, msg_ctx, username, password) \
00128       ((authn_provider)->ops->rampart_authn_provider_check_password( \
00129             authn_provider, env, msg_ctx, username, password))
00130 
00131 #define RAMPART_AUTHN_PROVIDER_CHECK_PASSWORD_DIGEST(authn_provider, env, msg_ctx, username, nonce, nonce_length, digest) \
00132       ((authn_provider)->ops->rampart_authn_provider_check_password_digest( \
00133             authn_provider, env, msg_ctx, username, nonce, nonce_length, digest))
00134 
00136 #ifdef __cplusplus
00137 }
00138 #endif
00139 
00140 #endif /* RAMPART_AUTHN_PROVIDER_H */
00141 

Generated on Wed Oct 14 01:02:16 2009 for Rampart/C by  doxygen 1.5.7.1