@@ -32,6 +32,9 @@ typedef struct oauth2_cfg_session_list_t {
3232
3333static oauth2_cfg_session_list_t * _session_list = NULL ;
3434
35+ #define OAUTH2_SESSION_TYPE_COOKIE_STR "cookie"
36+ #define OAUTH2_SESSION_TYPE_CACHE_STR "cache"
37+
3538static void _oauth2_cfg_session_register (oauth2_log_t * log , const char * name ,
3639 oauth2_cfg_session_t * session )
3740{
@@ -117,8 +120,8 @@ oauth2_cfg_session_t *_oauth2_cfg_session_obtain(oauth2_log_t *log,
117120
118121 if (_session_list == NULL ) {
119122 cfg = oauth2_cfg_session_init (log );
120- // TODO: "cookie" -> "shm"?
121- oauth2_cfg_session_set_options ( log , cfg , "cookie" , NULL );
123+ oauth2_cfg_session_set_options (
124+ log , cfg , OAUTH2_SESSION_TYPE_CACHE_STR , NULL );
122125 }
123126
124127 ptr = _session_list ;
@@ -272,13 +275,10 @@ _OAUTH_CFG_CTX_CALLBACK(oauth2_cfg_session_set_options_cache)
272275 return rv ;
273276}
274277
275- #define OAUTH2_SESSION_TYPE_COOKIE_STR "cookie"
276- #define OAUTH2_SESSION_TYPE_COOKIE_CACHE "cache"
277-
278278// clang-format off
279279static oauth2_cfg_set_options_ctx_t _oauth2_cfg_session_options_set [] = {
280280 { OAUTH2_SESSION_TYPE_COOKIE_STR , oauth2_cfg_session_set_options_cookie },
281- { OAUTH2_SESSION_TYPE_COOKIE_CACHE , oauth2_cfg_session_set_options_cache },
281+ { OAUTH2_SESSION_TYPE_CACHE_STR , oauth2_cfg_session_set_options_cache },
282282 { NULL , NULL }
283283};
284284// clang-format on
0 commit comments