Skip to content

Commit 6cb9b2c

Browse files
committed
Restore config_set/get_int
I mistakenly removed the `config_set/get_int` APIs when removing `config_set/get_str`.
1 parent 8d74f67 commit 6cb9b2c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/scitokens.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,10 @@ int keycache_set_jwks(const char *issuer, const char *jwks, char **err_msg) {
955955
return 0;
956956
}
957957

958+
int config_set_int(const char *key, int value, char **err_msg) {
959+
return scitoken_config_set_int(key, value, err_msg);
960+
}
961+
958962
int scitoken_config_set_int(const char *key, int value, char **err_msg) {
959963
if (!key) {
960964
if (err_msg) {
@@ -994,6 +998,10 @@ int scitoken_config_set_int(const char *key, int value, char **err_msg) {
994998
}
995999
}
9961000

1001+
int config_get_int(const char *key, char **err_msg) {
1002+
return scitoken_config_get_int(key, err_msg);
1003+
}
1004+
9971005
int scitoken_config_get_int(const char *key, char **err_msg) {
9981006
if (!key) {
9991007
if (err_msg) {

src/scitokens.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ int keycache_set_jwks(const char *issuer, const char *jwks, char **err_msg);
294294
* APIs for managing scitokens configuration parameters.
295295
*/
296296

297+
// On its way to deprecation
298+
int config_set_int(const char *key, int value, char **err_msg);
299+
297300
/**
298301
* Update scitokens int parameters.
299302
* Takes in key/value pairs and assigns the input value to whatever
@@ -302,6 +305,9 @@ int keycache_set_jwks(const char *issuer, const char *jwks, char **err_msg);
302305
*/
303306
int scitoken_config_set_int(const char *key, int value, char **err_msg);
304307

308+
// on its way to deprecation
309+
int config_get_int(const char *key, char **err_msg);
310+
305311
/**
306312
* Get current scitokens int parameters.
307313
* Returns the value associated with the supplied input key on success, and -1

0 commit comments

Comments
 (0)