Changes between Version 8 and Version 9 of WikiStart
- Timestamp:
- May 17, 2013 1:52:34 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v8 v9 155 155 }}} 156 156 157 The {{{write_cert}}} and {{{write_cert_ name}}} methods write the X.509 certificate from an identity. The private keys can similarly be read or written using {{{read_privkey_name}}} and {{{read_privkey}}}. The following snippet creates an identity, writes it to 2 files and reads it from those files printing the results. The output files will not contain the private key.157 The {{{write_cert}}} and {{{write_cert_file}}} methods write the X.509 certificate from an identity. The private keys can similarly be read or written using {{{read_privkey_file}}} and {{{read_privkey}}}. The following snippet creates an identity, writes it to 2 files and reads it from those files printing the results. The output files will not contain the private key. 158 158 159 159 {{{ … … 200 200 The Attribute constructor takes the issuing identity, the attribute being assigned and the validity period of the assertion (in seconds). This code assigns a principal to that class using the {{{principal}}} member. The {{{role}}} member and {{{linking_role}}} members can be used to construct the other kinds of attributes. 201 201 202 The {{{bake}}} member finalizes the attribute and creates a signed format for export, which one can write using the {{{write}}} and {{{write_ name}}} members, that are analogous to {{{write_cert}}} and {{{write_cert_name}}} members of identities.202 The {{{bake}}} member finalizes the attribute and creates a signed format for export, which one can write using the {{{write}}} and {{{write_file}}} members, that are analogous to {{{write_cert}}} and {{{write_cert_file}}} members of identities. 203 203 204 204 The {{{bake}}} method exists so that Attributes can contain conjunctions. If identity A wants to state that friendly admins are admins who are friendly ({{{A.friendly_admin <- A.friendly & A.admin}}}), this code will it: … … 214 214 attr.bake() 215 215 216 attr.write_ name("attr.xml")216 attr.write_file("attr.xml") 217 217 218 218 }}}