ns_crypto::JWT method build_protected_header (protected)

 <instance of ns_crypto::JWT[i]> build_protected_header -alg alg  \
    [ -kid kid ] [ -typ typ ] [ -cty cty ] \
    [ -extraheader extraheader ]

Defined in

Switches:
-alg (required)
-kid (optional)
-typ (optional, defaults to "JWT")
-cty (optional)
-extraheader (optional)

Testcases:
No testcase defined.
Source code:
set triples [list alg string $alg]
if {$typ ne ""} {
    lappend triples typ string $typ
}
if {$cty ne ""} {
    lappend triples cty string $cty
}
if {$kid ne ""} {
    lappend triples kid string $kid
}
if {$extraheader ne ""} {
    foreach {k t v} $extraheader {
        lappend triples $k $t $v
    }
}
set json [ns_json value -type object $triples]
return $json
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: