Skip to content

The value is comma-separated GROUP:ROLE entries; GROUP is percent-encoded UTF-8 and ROLE is limited to [A-Za-z0-9_.-], so after encoding neither part can contain , or : and the value splits unambiguously. A group name cannot smuggle in an extra entry.

Usage

parse_roles_header(value)

Arguments

value

The header value, or NULL.

Value

A named list: group -> character vector of roles. Malformed entries are skipped.

Examples

parse_roles_header("Fazenda%3A%20n%C3%BAcleo%20A:analista,ops:admin")
#> $`Fazenda: núcleo A`
#> [1] "analista"
#> 
#> $ops
#> [1] "admin"
#>