pub struct WebServerFlowBuilder { /* private fields */ }Expand description
Builder for WebServerFlow.
Implementations§
Source§impl WebServerFlowBuilder
impl WebServerFlowBuilder
Sourcepub fn consumer_key(self, key: impl Into<String>) -> Self
pub fn consumer_key(self, key: impl Into<String>) -> Self
Connected App’s Consumer Key (Client ID). Required.
Sourcepub fn consumer_secret(self, secret: impl Into<String>) -> Self
pub fn consumer_secret(self, secret: impl Into<String>) -> Self
Connected App’s Consumer Secret. Optional — set only for confidential clients. Public (PKCE-only) clients omit it.
Sourcepub fn redirect_uri(self, uri: impl Into<String>) -> Self
pub fn redirect_uri(self, uri: impl Into<String>) -> Self
Redirect URI registered on the Connected App. Required. Must match exactly (Salesforce compares string-for-string).
Sourcepub fn login_url(self, url: impl Into<String>) -> Self
pub fn login_url(self, url: impl Into<String>) -> Self
Authorization host. Defaults to PRODUCTION_LOGIN_URL. Use
SANDBOX_LOGIN_URL for sandboxes or your org’s My Domain login URL.
Sourcepub fn scope(self, scope: impl Into<String>) -> Self
pub fn scope(self, scope: impl Into<String>) -> Self
Adds a scope to the authorization request. Multiple calls accumulate.
Common values include api, refresh_token, id, openid.
Sourcepub fn scopes<I, S>(self, scopes: I) -> Self
pub fn scopes<I, S>(self, scopes: I) -> Self
Replaces the entire scope set. Convenient when scopes are computed elsewhere as a slice.
Sourcepub fn prompt(self, prompt: impl Into<String>) -> Self
pub fn prompt(self, prompt: impl Into<String>) -> Self
Adds the OAuth prompt parameter (e.g. login, consent,
select_account).
Sourcepub fn login_hint(self, hint: impl Into<String>) -> Self
pub fn login_hint(self, hint: impl Into<String>) -> Self
Pre-fills the username field on the authorization page.
Sourcepub fn build(self) -> AuthResult<WebServerFlow>
pub fn build(self) -> AuthResult<WebServerFlow>
Finalizes the builder.