Skip to contents

The object provides a list of details of security schemes for the API. Each element within the list is an abstract_security_scheme() object.

Usage

class_security_scheme_details(...)

Arguments

...

One or more abstract_security_scheme() objects or a list of such objects. These objects must be generated by class_api_key_security_scheme() or class_oauth2_security_scheme() (http_security_scheme() and open_id_connect_security_scheme() coming soon).

Value

A security_scheme_details object, which is a validated list of abstract_security_scheme() objects.

Examples

class_security_scheme_details(
  class_oauth2_security_scheme(
    password_flow = class_oauth2_token_flow(
      token_url = "/account/authorization",
      scopes = class_scopes(
        name = c("Catalog", "Commerce", "Playback", "Settings"),
        description = c(
          "Access all read-only content",
          "Perform account-level transactions",
          "Allow playback of restricted content",
          "Modify account settings"
        )
      )
    )
  ),
  class_oauth2_security_scheme(
    password_flow = class_oauth2_token_flow(
      token_url = "/account/profile/authorization",
      scopes = class_scopes(
        name = "Catalog",
        description = "Modify profile preferences and activity"
      )
    )
  ),
  class_api_key_security_scheme(
    parameter_name = "authorization",
    location = "header"
  ),
  class_api_key_security_scheme(
    parameter_name = "authorization",
    location = "header"
  )
)
#> <rapid::security_scheme_details> List of 4
#>  $ : <rapid::oauth2_security_scheme>
#>   ..@ implicit_flow          : <rapid::oauth2_implicit_flow>
#>  .. .. @ refresh_url      : chr(0) 
#>  .. .. @ scopes           : <rapid::scopes>
#>  .. .. .. @ name       : chr(0) 
#>  .. .. .. @ description: chr(0) 
#>  .. .. @ authorization_url: chr(0) 
#>   ..@ password_flow          : <rapid::oauth2_token_flow>
#>  .. .. @ refresh_url: chr(0) 
#>  .. .. @ scopes     : <rapid::scopes>
#>  .. .. .. @ name       : chr [1:4] "Catalog" "Commerce" "Playback" "Settings"
#>  .. .. .. @ description: chr [1:4] "Access all read-only content" "Perform account-level transactions" "Allow playback of restricted content" "Modify account settings"
#>  .. .. @ token_url  : chr "/account/authorization"
#>   ..@ client_credentials_flow: <rapid::oauth2_token_flow>
#>  .. .. @ refresh_url: chr(0) 
#>  .. .. @ scopes     : <rapid::scopes>
#>  .. .. .. @ name       : chr(0) 
#>  .. .. .. @ description: chr(0) 
#>  .. .. @ token_url  : chr(0) 
#>   ..@ authorization_code_flow: <rapid::oauth2_authorization_code_flow>
#>  .. .. @ refresh_url      : chr(0) 
#>  .. .. @ scopes           : <rapid::scopes>
#>  .. .. .. @ name       : chr(0) 
#>  .. .. .. @ description: chr(0) 
#>  .. .. @ authorization_url: chr(0) 
#>  .. .. @ token_url        : chr(0) 
#>  $ : <rapid::oauth2_security_scheme>
#>   ..@ implicit_flow          : <rapid::oauth2_implicit_flow>
#>  .. .. @ refresh_url      : chr(0) 
#>  .. .. @ scopes           : <rapid::scopes>
#>  .. .. .. @ name       : chr(0) 
#>  .. .. .. @ description: chr(0) 
#>  .. .. @ authorization_url: chr(0) 
#>   ..@ password_flow          : <rapid::oauth2_token_flow>
#>  .. .. @ refresh_url: chr(0) 
#>  .. .. @ scopes     : <rapid::scopes>
#>  .. .. .. @ name       : chr "Catalog"
#>  .. .. .. @ description: chr "Modify profile preferences and activity"
#>  .. .. @ token_url  : chr "/account/profile/authorization"
#>   ..@ client_credentials_flow: <rapid::oauth2_token_flow>
#>  .. .. @ refresh_url: chr(0) 
#>  .. .. @ scopes     : <rapid::scopes>
#>  .. .. .. @ name       : chr(0) 
#>  .. .. .. @ description: chr(0) 
#>  .. .. @ token_url  : chr(0) 
#>   ..@ authorization_code_flow: <rapid::oauth2_authorization_code_flow>
#>  .. .. @ refresh_url      : chr(0) 
#>  .. .. @ scopes           : <rapid::scopes>
#>  .. .. .. @ name       : chr(0) 
#>  .. .. .. @ description: chr(0) 
#>  .. .. @ authorization_url: chr(0) 
#>  .. .. @ token_url        : chr(0) 
#>  $ : <rapid::api_key_security_scheme>
#>   ..@ parameter_name: chr "authorization"
#>   ..@ location      : chr "header"
#>  $ : <rapid::api_key_security_scheme>
#>   ..@ parameter_name: chr "authorization"
#>   ..@ location      : chr "header"