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_NUMMETHODS
16 AUTHORIZEMETHOD_DISABLED,
17 AUTHORIZEMETHOD_REQUIRED,
18 AUTHORIZEMETHOD_SUFFICIENT
27 size_t client_data_len;
28 author_method_t method;
29 } authorization_data_t;
33 int authorization_init_server (authorization_data_t ***data,
34 author_method_t methods[]);
35 void authorization_data_free (authorization_data_t **data);
36 void authorization_data_free_contents (authorization_data_t *data);
38 char * authorization_get_name(author_method_t method);
39 author_method_t authorization_get_method(
char *name);
40 author_status_t authorization_get_status(author_method_t method,
41 struct myproxy_creds *creds,
43 myproxy_server_context_t* config);
52 authorization_data_t *
53 authorization_store_response(
char *,
56 authorization_data_t **);
64 authorization_data_t *
65 authorization_create_response(authorization_data_t **,
68 size_t extra_data_len);
73 int authorization_check(authorization_data_t *client_auth_data,
74 struct myproxy_creds *creds,
77 int authorization_check_ex(authorization_data_t *client_auth_data,
78 struct myproxy_creds *creds,
80 myproxy_server_context_t *config);