Add GssapiSignalPersistentAuth directive
[mod_auth_gssapi.git] / src / mod_auth_gssapi.h
1 /* Copyright (C) 2014 mod_auth_gssapi authors - See COPYING for (C) terms */
2
3 #include <stdbool.h>
4 #include <stdint.h>
5 #include <time.h>
6 #include <gssapi/gssapi.h>
7 #include <gssapi/gssapi_ext.h>
8 #include <gssapi/gssapi_krb5.h>
9
10 #define APR_WANT_STRFUNC
11 #include "apr_want.h"
12 #include <apr_strings.h>
13 #include <apr_base64.h>
14
15 #include <httpd.h>
16 #include <http_core.h>
17 #include <http_connection.h>
18 #include <http_log.h>
19 #include <http_request.h>
20 #include <mod_session.h>
21
22 /* apache's httpd.h drags in empty PACKAGE_* variables.
23  * undefine them to avoid annoying compile warnings as they
24  * are re-defined in config.h */
25 #undef PACKAGE_BUGREPORT
26 #undef PACKAGE_NAME
27 #undef PACKAGE_STRING
28 #undef PACKAGE_TARNAME
29 #undef PACKAGE_VERSION
30 #include "config.h"
31
32 #include "crypto.h"
33 #include "sessions.h"
34
35 #define MIN_SESS_EXP_TIME 300 /* 5 minutes validity minimum */
36
37 struct mag_config {
38     apr_pool_t *pool;
39     bool ssl_only;
40     bool map_to_local;
41     bool gss_conn_ctx;
42     bool send_persist;
43     bool use_sessions;
44     bool use_s4u2proxy;
45     char *deleg_ccache_dir;
46     gss_key_value_set_desc *cred_store;
47     struct seal_key *mag_skey;
48     bool use_basic_auth;
49 };
50
51 struct mag_conn {
52     apr_pool_t *parent;
53     gss_ctx_id_t ctx;
54     bool established;
55     const char *user_name;
56     const char *gss_name;
57     time_t expiration;
58     const char *auth_type;
59 };