Skip to main content

Mountain/RPC/CocoonService/Auth/
GetAuthenticationSession.rs

1#![allow(non_snake_case)]
2
3//! Return an authentication session for the requested provider. Cocoon
4//! auth providers register themselves via `RegisterAuthenticationProvider`
5//! and live in `ApplicationState`; the full OAuth dance requires Mountain
6//! to open a browser window, so for now we return an empty session.
7
8use tonic::{Response, Status};
9
10use crate::{
11	RPC::CocoonService::CocoonServiceImpl,
12	Vine::Generated::{GetAuthenticationSessionRequest, GetAuthenticationSessionResponse},
13	dev_log,
14};
15
16pub async fn Fn(
17	_Service:&CocoonServiceImpl,
18	Request:GetAuthenticationSessionRequest,
19) -> Result<Response<GetAuthenticationSessionResponse>, Status> {
20	dev_log!(
21		"cocoon",
22		"[CocoonService] get_authentication_session: provider={}",
23		Request.provider_id
24	);
25	Ok(Response::new(GetAuthenticationSessionResponse::default()))
26}