Skip to main content

Mountain/RPC/CocoonService/Auth/
GetAuthenticationSession.rs

1
2//! Return an authentication session for the requested provider. Cocoon
3//! auth providers register themselves via `RegisterAuthenticationProvider`
4//! and live in `ApplicationState`; the full OAuth dance requires Mountain
5//! to open a browser window, so for now we return an empty session.
6
7use tonic::{Response, Status};
8
9use crate::{
10	RPC::CocoonService::CocoonServiceImpl,
11	Vine::Generated::{GetAuthenticationSessionRequest, GetAuthenticationSessionResponse},
12	dev_log,
13};
14
15pub async fn Fn(
16	_Service:&CocoonServiceImpl,
17
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
26	Ok(Response::new(GetAuthenticationSessionResponse::default()))
27}