The spec says:
authorize(TokenParams?, AuthOptions?) => io TokenDetails // RSA10
createTokenRequest(TokenParams?, AuthOptions?) => io TokenRequest // RSA9
requestToken(TokenParams?, AuthOptions?) => io TokenDetails // RSA8e
The spec says these are optional. if missing it uses the configured defaults. This would make out API fn authorize(Option<&TokenParams>, Option<&AuthOptions>) . This is probably a little awkward.
Alternatively we could go for authorize(&TokenParams, &AuthOptions) and add functions to fetch the current defaults from auth. Meaning the user could do auth.authorize(auth.params(), auth.options()) for the defaults. we could then rename this function to authorize_with and make authorize a shortcut that just calls authorize_with with the defaults
Thoughts?
┆Issue is synchronized with this Jira Task by Unito
The spec says:
The spec says these are optional. if missing it uses the configured defaults. This would make out API
fn authorize(Option<&TokenParams>, Option<&AuthOptions>). This is probably a little awkward.Alternatively we could go for
authorize(&TokenParams, &AuthOptions)and add functions to fetch the current defaults from auth. Meaning the user could doauth.authorize(auth.params(), auth.options())for the defaults. we could then rename this function toauthorize_withand makeauthorizea shortcut that just callsauthorize_withwith the defaultsThoughts?
┆Issue is synchronized with this Jira Task by Unito