1 #ifndef __MYPROXY_AUTHORIZATION_H
2 #define __MYPROXY_AUTHORIZATION_H
4 #include "myproxy_creds.h"
5 #include "myproxy_server.h"
8 AUTHORIZETYPE_NULL = 0,
12 AUTHORIZETYPE_CERT256,
13 AUTHORIZETYPE_NUMMETHODS
17 AUTHORIZEMETHOD_DISABLED,
18 AUTHORIZEMETHOD_REQUIRED,
19 AUTHORIZEMETHOD_SUFFICIENT
28 size_t client_data_len;
29 author_method_t method;
30 } authorization_data_t;
34 int authorization_init_server (authorization_data_t ***data,
35 author_method_t methods[]);
36 void authorization_data_free (authorization_data_t **data);
37 void authorization_data_free_contents (authorization_data_t *data);
39 char * authorization_get_name(author_method_t method);
40 author_method_t authorization_get_method(
char *name);
41 author_status_t authorization_get_status(author_method_t method,
42 struct myproxy_creds *creds,
44 myproxy_server_context_t* config);
53 authorization_data_t *
54 authorization_store_response(
char *,
57 authorization_data_t **);
65 authorization_data_t *
66 authorization_create_response(authorization_data_t **,
69 size_t extra_data_len);
74 int authorization_check(authorization_data_t *client_auth_data,
75 struct myproxy_creds *creds,
78 int authorization_check_ex(authorization_data_t *client_auth_data,
79 struct myproxy_creds *creds,
81 myproxy_server_context_t *config);