Content-Length: 266339 | pFad | https://github.com/sebadob/rauthy/commit/05a8793f013f864db1855ae0ee1c848ec36b9254

58 Merge pull request #482 from sebadob/userinfo-post-handler · sebadob/rauthy@05a8793 · GitHub
Skip to content

Commit

Permalink
Merge pull request #482 from sebadob/userinfo-post-handler
Browse files Browse the repository at this point in the history
add a `POST` handler for the `/userinfo`
  • Loading branch information
sebadob authored Jun 18, 2024
2 parents e9a4ad1 + 9e26ddc commit 05a8793
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/api/src/oidc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,31 @@ pub async fn get_userinfo(
.map(|u| HttpResponse::Ok().json(u))
}

//github.com/ The userinfo endpoint for the OIDC standard.
//github.com/
//github.com/ Depending on the JWT token from the *Authorization* header, it will return information about
//github.com/ the requesting user / token.
#[utoipa::path(
post,
path = "/oidc/userinfo",
tag = "oidc",
responses(
(status = 200, description = "Ok", body = Userinfo),
(status = 400, description = "BadRequest", body = ErrorResponse),
(status = 401, description = "Unauthorized", body = ErrorResponse),
(status = 404, description = "NotFound", body = ErrorResponse),
),
)]
#[post("/oidc/userinfo")]
pub async fn post_userinfo(
data: web::Data<AppState>,
req: HttpRequest,
) -> Result<HttpResponse, ErrorResponse> {
auth::get_userinfo(&data, req)
.await
.map(|u| HttpResponse::Ok().json(u))
}

//github.com/ GET forward authentication
//github.com/
//github.com/ This endpoint is very similar to the `/userinfo`, but instead of returning information about
Expand Down
1 change: 1 addition & 0 deletions src/bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ async fn actix_main(app_state: web::Data<AppState>) -> std::io::Result<()> {
.service(oidc::post_token)
.service(oidc::post_token_info)
.service(oidc::get_userinfo)
.service(oidc::post_userinfo)
.service(oidc::get_forward_auth)
.service(generic::get_enc_keys)
.service(generic::post_migrate_enc_key)
Expand Down

0 comments on commit 05a8793

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/sebadob/rauthy/commit/05a8793f013f864db1855ae0ee1c848ec36b9254

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy