OAuth2 token flow object
Source:R/components-security_scheme-oauth2-token_flow.R
class_oauth2_token_flow.Rd
An oauth2_token_flow
object describes the configuration for the OAuth
Resource Owner Password flow or the OAuth Client Credentials flow (previously
called application in OpenAPI 2.0).
Usage
class_oauth2_token_flow(
token_url = character(),
...,
refresh_url = character(),
scopes = class_scopes()
)
Arguments
- token_url
Character vector (required). The token URL to be used for this flow. This must be in the form of a URL. The OAuth2 standard requires the use of TLS.
- ...
These dots are for future extensions and must be empty.
- refresh_url
Character scalar (optional). The URL to be used for obtaining refresh tokens. This must be in the form of a URL. The OAuth2 standard requires the use of TLS.
- scopes
An optional
class_scopes()
object with the available scopes for the OAuth2 security scheme.
See also
security scheme objects
as_api_key_security_scheme()
,
as_oauth2_authorization_code_flow()
,
as_oauth2_implicit_flow()
,
as_oauth2_security_scheme()
,
as_oauth2_token_flow()
,
as_scopes()
,
as_security_scheme()
,
as_security_scheme_details()
,
as_security_schemes()
,
class_api_key_security_scheme()
,
class_oauth2_authorization_code_flow()
,
class_oauth2_implicit_flow()
,
class_oauth2_security_scheme()
,
class_scopes()
,
class_security_scheme_details()
,
class_security_schemes()
components object
as_api_key_security_scheme()
,
as_components()
,
as_oauth2_authorization_code_flow()
,
as_oauth2_implicit_flow()
,
as_oauth2_security_scheme()
,
as_oauth2_token_flow()
,
as_reference()
,
as_schema()
,
as_scopes()
,
as_security_scheme()
,
as_security_scheme_details()
,
as_security_schemes()
,
class_api_key_security_scheme()
,
class_components()
,
class_oauth2_authorization_code_flow()
,
class_oauth2_implicit_flow()
,
class_oauth2_security_scheme()
,
class_reference()
,
class_schema()
,
class_scopes()
,
class_security_scheme_details()
,
class_security_schemes()
Examples
class_oauth2_token_flow(
token_url = "https://example.com/token",
refresh_url = "https://example.com/refresh",
scopes = class_scopes(
name = c("server:read", "server:write"),
description = c("Read server settings", "Write server settings")
)
)
#> <rapid::oauth2_token_flow>
#> @ refresh_url: chr "https://example.com/refresh"
#> @ scopes : <rapid::scopes>
#> .. @ name : chr [1:2] "server:read" "server:write"
#> .. @ description: chr [1:2] "Read server settings" "Write server settings"
#> @ token_url : chr "https://example.com/token"