Skip to content

Commit edf6de3

Browse files
committed
obtain ROPC username from env variable STS_ROPC_USERNAME
bump to version 0.9.7 Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
1 parent a81cedd commit edf6de3

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
05/17/2019
2+
- obtain ROPC username from environment variable STS_ROPC_USERNAME if set
3+
- version 0.9.7
4+
15
10/02/2018
26
- various corrections related to packaging
37
- version 0.9.6

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([mod_sts],[0.9.6],[hans.zandbelt@zmartzone.eu])
1+
AC_INIT([mod_sts],[0.9.7],[hans.zandbelt@zmartzone.eu])
22

33
AC_SUBST(NAMEVER, AC_PACKAGE_TARNAME()-AC_PACKAGE_VERSION())
44

src/ropc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
#define STS_ROPC_USERNAME "username"
5555
#define STS_ROPC_PASSWORD "password"
5656

57+
#define STS_ROPC_USERNAME_ENV_VAR "STS_ROPC_USERNAME"
58+
5759
int sts_ropc_config_check_vhost(apr_pool_t *pool, server_rec *s,
5860
sts_server_config *cfg) {
5961
if (cfg->ropc_endpoint == NULL) {
@@ -94,6 +96,10 @@ static const char * sts_ropc_get_client_id(request_rec *r) {
9496
static const char * sts_ropc_get_username(request_rec *r) {
9597
sts_server_config *cfg = (sts_server_config *) ap_get_module_config(
9698
r->server->module_config, &sts_module);
99+
const char *username = apr_table_get(r->subprocess_env,
100+
STS_ROPC_USERNAME_ENV_VAR);
101+
if (username != NULL)
102+
return username;
97103
if (cfg->ropc_username == NULL)
98104
// return the client_id by default
99105
return sts_ropc_get_client_id(r);

0 commit comments

Comments
 (0)