Skip to content

Commit

Permalink
make public keys for encrypted access tokens available for OAuth
Browse files Browse the repository at this point in the history
fixes #74
  • Loading branch information
Hans Zandbelt committed Jun 19, 2015
1 parent 1a78034 commit f7468e6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
6/19/2015
- make public keys for encrypted access tokens available in OAuth-only configurations; fixes #74

6/15/2015
- add a complete JWT sample that includes validation of "exp" and "iat" to the test suite

Expand Down
2 changes: 1 addition & 1 deletion src/mod_auth_openidc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,7 @@ static int oidc_handle_logout(request_rec *r, oidc_cfg *c, session_rec *session)
/*
* handle request for JWKs
*/
static int oidc_handle_jwks(request_rec *r, oidc_cfg *c) {
int oidc_handle_jwks(request_rec *r, oidc_cfg *c) {

/* pickup requested JWKs type */
// char *jwks_type = NULL;
Expand Down
1 change: 1 addition & 0 deletions src/mod_auth_openidc.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ int oidc_auth_checker(request_rec *r);
#endif
void oidc_request_state_set(request_rec *r, const char *key, const char *value);
const char*oidc_request_state_get(request_rec *r, const char *key);
int oidc_handle_jwks(request_rec *r, oidc_cfg *c);

// oidc_oauth
int oidc_oauth_check_userid(request_rec *r, oidc_cfg *c);
Expand Down
10 changes: 10 additions & 0 deletions src/oauth.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,16 @@ int oidc_oauth_check_userid(request_rec *r, oidc_cfg *c) {

return OK;
}

/* check if this is a request for the public (encryption) keys */
} else if ((c->redirect_uri != NULL) && (oidc_util_request_matches_url(r, c->redirect_uri))) {

if (oidc_util_request_has_parameter(r, "jwks")) {

return oidc_handle_jwks(r, c);

}

}

/* we don't have a session yet */
Expand Down

0 comments on commit f7468e6

Please sign in to comment.