Fix comments
This commit is contained in:
parent
2f8fd66648
commit
b4a823a35f
@ -7,7 +7,7 @@ use actix_session::Session;
|
|||||||
use actix_web::{web, HttpResponse};
|
use actix_web::{web, HttpResponse};
|
||||||
use light_openid::primitives::OpenIDConfig;
|
use light_openid::primitives::OpenIDConfig;
|
||||||
|
|
||||||
// Main route
|
/// Main route
|
||||||
pub async fn home(session: Session) -> HttpResult {
|
pub async fn home(session: Session) -> HttpResult {
|
||||||
// Get user information, requesting authentication if information is missing
|
// Get user information, requesting authentication if information is missing
|
||||||
let Some(user): Option<User> = session.get(USER_SESSION_KEY)? else {
|
let Some(user): Option<User> = session.get(USER_SESSION_KEY)? else {
|
||||||
@ -36,7 +36,7 @@ pub struct AuthCallbackQuery {
|
|||||||
state: String,
|
state: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Authenticate user callback
|
/// Authenticate user callback
|
||||||
pub async fn oidc_cb(session: Session, query: web::Query<AuthCallbackQuery>) -> HttpResult {
|
pub async fn oidc_cb(session: Session, query: web::Query<AuthCallbackQuery>) -> HttpResult {
|
||||||
if session.get(STATE_KEY)? != Some(query.state.to_string()) {
|
if session.get(STATE_KEY)? != Some(query.state.to_string()) {
|
||||||
return Ok(HttpResponse::BadRequest()
|
return Ok(HttpResponse::BadRequest()
|
||||||
|
Loading…
Reference in New Issue
Block a user