ns_crypto::JWT method build_protected_header (protected)
<instance of ns_crypto::JWT> build_protected_header -alg alg \ [ -kid kid ] [ -typ typ ] [ -cty cty ] \ [ -extraheader extraheader ]
Defined in /usr/local/ns/lib/nsf2.5.0/lib/nx-traits.tcl
- 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 $jsonXQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)