The object lists the required security schemes to execute an operation or operations.
Arguments
- name
Character vector (required). The names must correspond to security schemes declared in the
security_schemes
property of aclass_components()
.- ...
These dots are for future extensions and must be empty.
- required_scopes
A list of character vectors, each of which describe the scopes required for this security scheme. The vector corresponding to a given
name
can be empty.
See also
security object
as_security()
Examples
class_security()
#> <rapid::security>
#> @ name : chr(0)
#> @ required_scopes : list()
#> @ rapid_class_requirement: chr "security_scheme"
class_security(
name = c("oauth2", "internalApiKey"),
required_scopes = list(
c("user", "user:email", "user:follow"),
character()
)
)
#> <rapid::security>
#> @ name : chr [1:2] "oauth2" "internalApiKey"
#> @ required_scopes :List of 2
#> .. $ : chr [1:3] "user" "user:email" "user:follow"
#> .. $ : chr(0)
#> @ rapid_class_requirement: chr "security_scheme"