[][src]Trait fxa_client::http_client::FxAClient

pub(crate) trait FxAClient {
    fn refresh_token_with_code(
        &self,
        config: &Config,
        code: &str,
        code_verifier: &str
    ) -> Result<OAuthTokenResponse>;
fn refresh_token_with_session_token(
        &self,
        config: &Config,
        session_token: &str,
        scopes: &[&str]
    ) -> Result<OAuthTokenResponse>;
fn oauth_introspect_refresh_token(
        &self,
        config: &Config,
        refresh_token: &str
    ) -> Result<IntrospectResponse>;
fn access_token_with_refresh_token(
        &self,
        config: &Config,
        refresh_token: &str,
        ttl: Option<u64>,
        scopes: &[&str]
    ) -> Result<OAuthTokenResponse>;
fn access_token_with_session_token(
        &self,
        config: &Config,
        session_token: &str,
        scopes: &[&str]
    ) -> Result<OAuthTokenResponse>;
fn authorization_code_using_session_token(
        &self,
        config: &Config,
        session_token: &str,
        auth_params: AuthorizationRequestParameters
    ) -> Result<OAuthAuthResponse>;
fn duplicate_session(
        &self,
        config: &Config,
        session_token: &str
    ) -> Result<DuplicateTokenResponse>;
fn destroy_access_token(&self, config: &Config, token: &str) -> Result<()>;
fn destroy_refresh_token(&self, config: &Config, token: &str) -> Result<()>;
fn profile(
        &self,
        config: &Config,
        profile_access_token: &str,
        etag: Option<String>
    ) -> Result<Option<ResponseAndETag<ProfileResponse>>>;
fn set_ecosystem_anon_id(
        &self,
        config: &Config,
        access_token: &str,
        ecosystem_anon_id: &str
    ) -> Result<()>;
fn pending_commands(
        &self,
        config: &Config,
        refresh_token: &str,
        index: u64,
        limit: Option<u64>
    ) -> Result<PendingCommandsResponse>;
fn invoke_command(
        &self,
        config: &Config,
        refresh_token: &str,
        command: &str,
        target: &str,
        payload: &Value
    ) -> Result<()>;
fn devices(
        &self,
        config: &Config,
        refresh_token: &str
    ) -> Result<Vec<GetDeviceResponse>>;
fn update_device(
        &self,
        config: &Config,
        refresh_token: &str,
        update: DeviceUpdateRequest<'_>
    ) -> Result<DeviceResponseCommon>;
fn destroy_device(
        &self,
        config: &Config,
        refresh_token: &str,
        id: &str
    ) -> Result<()>;
fn attached_clients(
        &self,
        config: &Config,
        session_token: &str
    ) -> Result<Vec<GetAttachedClientResponse>>;
fn scoped_key_data(
        &self,
        config: &Config,
        session_token: &str,
        client_id: &str,
        scope: &str
    ) -> Result<HashMap<String, ScopedKeyDataResponse>>;
fn fxa_client_configuration(
        &self,
        config: &Config
    ) -> Result<ClientConfigurationResponse>;
fn openid_configuration(
        &self,
        config: &Config
    ) -> Result<OpenIdConfigurationResponse>; }

Required methods

fn refresh_token_with_code(
    &self,
    config: &Config,
    code: &str,
    code_verifier: &str
) -> Result<OAuthTokenResponse>

fn refresh_token_with_session_token(
    &self,
    config: &Config,
    session_token: &str,
    scopes: &[&str]
) -> Result<OAuthTokenResponse>

fn oauth_introspect_refresh_token(
    &self,
    config: &Config,
    refresh_token: &str
) -> Result<IntrospectResponse>

fn access_token_with_refresh_token(
    &self,
    config: &Config,
    refresh_token: &str,
    ttl: Option<u64>,
    scopes: &[&str]
) -> Result<OAuthTokenResponse>

fn access_token_with_session_token(
    &self,
    config: &Config,
    session_token: &str,
    scopes: &[&str]
) -> Result<OAuthTokenResponse>

fn authorization_code_using_session_token(
    &self,
    config: &Config,
    session_token: &str,
    auth_params: AuthorizationRequestParameters
) -> Result<OAuthAuthResponse>

fn duplicate_session(
    &self,
    config: &Config,
    session_token: &str
) -> Result<DuplicateTokenResponse>

fn destroy_access_token(&self, config: &Config, token: &str) -> Result<()>

fn destroy_refresh_token(&self, config: &Config, token: &str) -> Result<()>

fn profile(
    &self,
    config: &Config,
    profile_access_token: &str,
    etag: Option<String>
) -> Result<Option<ResponseAndETag<ProfileResponse>>>

fn set_ecosystem_anon_id(
    &self,
    config: &Config,
    access_token: &str,
    ecosystem_anon_id: &str
) -> Result<()>

fn pending_commands(
    &self,
    config: &Config,
    refresh_token: &str,
    index: u64,
    limit: Option<u64>
) -> Result<PendingCommandsResponse>

fn invoke_command(
    &self,
    config: &Config,
    refresh_token: &str,
    command: &str,
    target: &str,
    payload: &Value
) -> Result<()>

fn devices(
    &self,
    config: &Config,
    refresh_token: &str
) -> Result<Vec<GetDeviceResponse>>

fn update_device(
    &self,
    config: &Config,
    refresh_token: &str,
    update: DeviceUpdateRequest<'_>
) -> Result<DeviceResponseCommon>

fn destroy_device(
    &self,
    config: &Config,
    refresh_token: &str,
    id: &str
) -> Result<()>

fn attached_clients(
    &self,
    config: &Config,
    session_token: &str
) -> Result<Vec<GetAttachedClientResponse>>

fn scoped_key_data(
    &self,
    config: &Config,
    session_token: &str,
    client_id: &str,
    scope: &str
) -> Result<HashMap<String, ScopedKeyDataResponse>>

fn fxa_client_configuration(
    &self,
    config: &Config
) -> Result<ClientConfigurationResponse>

fn openid_configuration(
    &self,
    config: &Config
) -> Result<OpenIdConfigurationResponse>

Loading content...

Implementors

impl FxAClient for Client[src]

Loading content...