rampart_authn_provider.h

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 
00021 
00022 #ifdef __cplusplus
00023 extern "C"
00024 {
00025 #endif
00026     /*typedef enum {
00027         AUTHN_PROVIDER_DENIED,
00028         AUTHN_PROVIDER_GRANTED,
00029         AUTHN_PROVIDER_FOUND,
00030         AUTHN_PROVIDER_USER_NOT_FOUND,
00031         AUTHN_PROVIDER_GENERAL_ERROR
00032     } rampart_authn_provider_status;
00033     */
00044     typedef struct rampart_authn_provider_ops rampart_authn_provider_ops_t;
00045 
00050     typedef struct rampart_authn_provider rampart_authn_provider_t;
00051     
00054      struct rampart_authn_provider_ops
00055     {            
00056            
00057 
00058             axis2_status_t (AXIS2_CALL*
00059             rampart_authn_provider_check_password)(
00060                 rampart_authn_provider_t *authn_provider,
00061                 const axis2_env_t* env,
00062                 axis2_msg_ctx_t *msg_ctx,
00063                 const axis2_char_t *username, 
00064                 const axis2_char_t *password
00065             );
00066             
00067             axis2_status_t (AXIS2_CALL*
00068             rampart_authn_provider_check_password_digest)(
00069                 rampart_authn_provider_t *authn_provider,
00070                 const axis2_env_t* env,
00071                 axis2_msg_ctx_t *msg_ctx,
00072                 const char *nonce, 
00073                 size_t nonce_length, 
00074                 const char *digest
00075             );
00076 
00077             axis2_status_t (AXIS2_CALL*
00078             free)(rampart_authn_provider_t *authn_provider,
00079                   const axis2_env_t* env);
00080 
00081     };
00082 
00083     struct rampart_authn_provider
00084     {
00085         rampart_authn_provider_ops_t *ops;
00086     };
00087 
00088 /*************************** Function macros **********************************/
00089 /*TODO write the implementation*/
00090 #define RAMPART_AUTHN_PROVIDER_FREE(authn_provider, env) \
00091       ((authn_provider)->ops->free (authn_provider, env))
00092 
00093 #define RAMPART_AUTHN_PROVIDER_CHECK_PASSWORD(authn_provider, env, msg_ctx, username, password) \
00094       ((authn_provider)->ops->authn_provider_password(authn_provider, env, msg_ctx, username, password))
00095 
00096 #define RAMPART_AUTHN_PROVIDER_CHECK_PASSWORD_DIGEST(authn_provider, env, msg_ctx, nonce, nonce_length, digest) \
00097       ((authn_provider)->ops->authn_provider_password(authn_provider, env, msg_ctx, nonce, nonce_length, digest))
00098 
00100 #ifdef __cplusplus
00101 }
00102 #endif
00103 
00104 #endif                          /* RAMPART_AUTHN_PROVIDER_H */
00105 

Generated on Wed Dec 20 20:14:10 2006 for Axis2/C by  doxygen 1.5.1