async fn authorize<'a>(
        &'a self,
        context: &'a TokenManagerContext,
        app_config: AppConfig,
        _auth_ui_context: Option<ClientEnd<AuthenticationUiContextMarker>>,
        user_profile_id: Option<String>,
        app_scopes: Vec<String>,
        auth_code: Option<String>,
    ) -> TokenManagerResult<UserProfileInfo> {
        // TODO(jsankey): Currently auth_ui_context is neither supplied by Topaz nor allowed to
        // override the auth UI context supplied at token manager construction (AUTH-110).
        // Depending on the outcome of design discussions either pass it through or remove it
        // entirely.
        // TODO(ukode, jsankey): This iotid check against the auth_provider_type is brittle and is
        // only a short-term solution. Eventually, this information will be coming from the
        // AuthProviderConfig params in some form.
        if app_config.auth_provider_type.to_ascii_lowercase().contains("iotid") {
            await!(self.handle_iotid_authorize(
                context,
                app_config,
                user_profile_id,
                app_scopes,
                auth_code
            ))
        } else {
            await!(self.handle_authorize(context, app_config, user_profile_id, app_scopes))
        }
    }
/// Implements the FIDL TokenManager.Authorize method.
Implements the FIDL TokenManager.Authorize method.
Implements the FIDL TokenManager . Authorize method .
async fn authorize<'a>(
        &'a self,
        context: &'a TokenManagerContext,
        app_config: AppConfig,
        _auth_ui_context: Option<ClientEnd<AuthenticationUiContextMarker>>,
        user_profile_id: Option<String>,
        app_scopes: Vec<String>,
        auth_code: Option<String>,
    ) -> TokenManagerResult<UserProfileInfo> {
        // TODO(jsankey): Currently auth_ui_context is neither supplied by Topaz nor allowed to
        // override the auth UI context supplied at token manager construction (AUTH-110).
        // Depending on the outcome of design discussions either pass it through or remove it
        // entirely.
        // TODO(ukode, jsankey): This iotid check against the auth_provider_type is brittle and is
        // only a short-term solution. Eventually, this information will be coming from the
        // AuthProviderConfig params in some form.
        if app_config.auth_provider_type.to_ascii_lowercase().contains("iotid") {
            await!(self.handle_iotid_authorize(
                context,
                app_config,
                user_profile_id,
                app_scopes,
                auth_code
            ))
        } else {
            await!(self.handle_authorize(context, app_config, user_profile_id, app_scopes))
        }
    }
async fn authorize < ' a > ( & ' a self , context : & ' a TokenManagerContext , app_config : AppConfig , _auth_ui_context : Option < ClientEnd < AuthenticationUiContextMarker > > , user_profile_id : Option < String > , app_scopes : Vec < String > , auth_code : Option < String > , ) -> TokenManagerResult < UserProfileInfo > { // TODO(jsankey): Currently auth_ui_context is neither supplied by Topaz nor allowed to // override the auth UI context supplied at token manager construction (AUTH-110). // Depending on the outcome of design discussions either pass it through or remove it // entirely. // TODO(ukode, jsankey): This iotid check against the auth_provider_type is brittle and is // only a short-term solution. Eventually, this information will be coming from the // AuthProviderConfig params in some form. if app_config . auth_provider_type . to_ascii_lowercase ( ) . contains ( " " ) { await ! ( self handle_iotid_authorize ( context app_config user_profile_id app_scopes auth_code ) ) } else { await ! ( self handle_authorize ( context app_config user_profile_id app_scopes ) ) } }
Implements the FIDL TokenManager.Authorize method.
Implements the FIDL TokenManager . Authorize method .
&'a self
context
&'a TokenManagerContext
app_config
AppConfig
_auth_ui_context
Option<ClientEnd<AuthenticationUiContextMarker>>
user_profile_id
Option<String>
app_scopes
Vec<String>
auth_code
Option<String>
&'a self
context
&'a TokenManagerContext
app_config
AppConfig
_auth_ui_context
Option<ClientEnd<AuthenticationUiContextMarker>>
user_profile_id
Option<String>
app_scopes
Vec<String>
auth_code
Option<String>