Struct squareup::models::AuthorizeOAuthParameters
source · pub struct AuthorizeOAuthParameters {
pub client_id: String,
pub scope: Option<Vec<OAuthPermission>>,
pub locale: Option<Locale>,
pub session: Option<bool>,
pub state: Option<String>,
pub code_challenge: Option<String>,
pub redirect_uri: Option<String>,
}Fields§
§client_id: StringThe Square-issued ID for your application, which is available on the OAuth page for your application in the Developer Dashboard.
scope: Option<Vec<OAuthPermission>>A space-separated list of the permissions that the application is requesting. Default: “MerchantProfileRead PaymentsRead SettlementsRead BankAccountsRead”
locale: Option<Locale>The locale to present the permission request form in. Square detects the appropriate locale automatically. Only provide this value if the application can definitively determine the preferred locale.
session: Option<bool>If false, the user must log in to their Square account to view the Permission Request form, even if they already have a valid user session. This value has no effect in the Square Sandbox. Default: true
state: Option<String>When provided, state is passed to the configured redirect URL after the Permission Request form is submitted. You can include state and verify its value to help protect against cross-site request forgery.
code_challenge: Option<String>When provided, the OAuth flow uses PKCE to authorize. The code_challenge will be associated with the AuthorizationCode and a code_verifier will need to passed in to obtain the access token.
redirect_uri: Option<String>The redirect URL assigned on the OAuth page for your application in the Developer Dashboard. This field is required to use a dynamic port at runtime (PKCE only). To use a dynamic port, use the literal “” as a placeholder for a port in the Redirect URL box in the Developer Dashboard, for example, http://localhost:. When you call the Authorize endpoint from an application, pass in the actual port in this field. For example: https://connect.squareup.com/oauth2/authorize?client_id={YOUR_APP_ID}&scope=MERCHANT_PROFILE_READ&redirect_uri=http://localhost:8000
Implementations§
source§impl AuthorizeOAuthParameters
impl AuthorizeOAuthParameters
pub fn to_query_string(&self) -> String
Trait Implementations§
source§impl Clone for AuthorizeOAuthParameters
impl Clone for AuthorizeOAuthParameters
source§fn clone(&self) -> AuthorizeOAuthParameters
fn clone(&self) -> AuthorizeOAuthParameters
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more