Skip to main content

Mountain/RPC/CocoonService/Auth/
GetAuthenticationSession.rs

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