Documentation ¶
Overview ¶
Package keyvalue implements the Key-Value Form Encoding as specified by the OpenID Authentication 2.0 specifications.
http://openid.net/specs/openid-authentication-2_0.html#rfc.section.4.1.1
Key-Value Form encoding is used for signature calculation and for direct responses to Relying Parties.
A message in Key-Value form is a sequence of lines. Each line begins with a key, followed by a colon, and the value associated with the key. The line is terminated by a single newline (UCS codepoint 10, "\n").
Example:
mode:error error:This is an example message
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrMissingFields = fmt.Errorf("No fields to sign") ErrEmptyForm = fmt.Errorf("Form is empty or values are missing.") )
Functions ¶
This section is empty.
Types ¶
type Form ¶
Form maps a string key to a string value.
func (Form) Get ¶
Get gets the value associated with the given key.
If there are no value associated with the key, Get returns the empty string.
type SignedForm ¶
type SignedForm struct { Form // List of fields to be signed without the "openid." prefix that the signature covers. Fields []string }
Signed message in key-value form.
func (*SignedForm) SignedFields ¶
func (s *SignedForm) SignedFields() string
Comma-separated list of signed fields
func (*SignedForm) SignedString ¶
func (s *SignedForm) SignedString() string
Convert the list of key/value pairs to be signed to an octet string by encoding with Key-Value Form Encoding.