summaryrefslogtreecommitdiffabout
path: root/include/opkele
Unidiff
Diffstat (limited to 'include/opkele') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/data.h2
-rw-r--r--include/opkele/util.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/opkele/data.h b/include/opkele/data.h
index d0b0516..904b5ae 100644
--- a/include/opkele/data.h
+++ b/include/opkele/data.h
@@ -1,18 +1,20 @@
1#ifndef __OPKELE_DATA_H 1#ifndef __OPKELE_DATA_H
2#define __OPKELE_DATA_H 2#define __OPKELE_DATA_H
3 3
4/** 4/**
5 * @brief the main opkele namespace 5 * @brief the main opkele namespace
6 */ 6 */
7namespace opkele { 7namespace opkele {
8 8
9 /** 9 /**
10 * @brief internal data opkele namespace 10 * @brief internal data opkele namespace
11 */ 11 */
12 namespace data { 12 namespace data {
13 extern const char *_default_p; 13 extern const char *_default_p;
14 extern const char *_default_g; 14 extern const char *_default_g;
15 extern const char *_iname_leaders;
16 extern const char *_whitespace_chars;
15 } 17 }
16} 18}
17 19
18#endif /* __OPKELE_DATA_H */ 20#endif /* __OPKELE_DATA_H */
diff --git a/include/opkele/util.h b/include/opkele/util.h
index 60955e1..fd974a1 100644
--- a/include/opkele/util.h
+++ b/include/opkele/util.h
@@ -63,48 +63,50 @@ namespace opkele {
63 /** 63 /**
64 * Encode binary data using base64. 64 * Encode binary data using base64.
65 * @param data pointer to binary data 65 * @param data pointer to binary data
66 * @param length length of data 66 * @param length length of data
67 * @return encoded data 67 * @return encoded data
68 */ 68 */
69 string encode_base64(const void *data,size_t length); 69 string encode_base64(const void *data,size_t length);
70 /** 70 /**
71 * Decode binary data from base64 representation. 71 * Decode binary data from base64 representation.
72 * @param data base64-encoded data 72 * @param data base64-encoded data
73 * @param rv container for decoded binary 73 * @param rv container for decoded binary
74 */ 74 */
75 void decode_base64(const string& data,vector<unsigned char>& rv); 75 void decode_base64(const string& data,vector<unsigned char>& rv);
76 76
77 /** 77 /**
78 * Normalize http(s) URI according to RFC3986, section 6. URI is 78 * Normalize http(s) URI according to RFC3986, section 6. URI is
79 * expected to have scheme: in front of it. 79 * expected to have scheme: in front of it.
80 * @param uri URI 80 * @param uri URI
81 * @return normalized URI 81 * @return normalized URI
82 * @throw not_implemented in case of non-httpi(s) URI 82 * @throw not_implemented in case of non-httpi(s) URI
83 * @throw bad_input in case of malformed URI 83 * @throw bad_input in case of malformed URI
84 */ 84 */
85 string rfc_3986_normalize_uri(const string& uri); 85 string rfc_3986_normalize_uri(const string& uri);
86 86
87 string normalize_identifier(const string& usi,bool strip_fragment);
88
87 /** 89 /**
88 * Match URI against realm 90 * Match URI against realm
89 * @param uri URI to match 91 * @param uri URI to match
90 * @param realm realm to match against 92 * @param realm realm to match against
91 * @return true if URI matches realm 93 * @return true if URI matches realm
92 */ 94 */
93 bool uri_matches_realm(const string& uri,const string& realm); 95 bool uri_matches_realm(const string& uri,const string& realm);
94 96
95 /** 97 /**
96 * Strip fragment part from URI 98 * Strip fragment part from URI
97 * @param uri input/output parameter containing the URI 99 * @param uri input/output parameter containing the URI
98 * @return reference to uri 100 * @return reference to uri
99 */ 101 */
100 string& strip_uri_fragment_part(string& uri); 102 string& strip_uri_fragment_part(string& uri);
101 103
102 /** 104 /**
103 * Calculate signature and encode it using base64 105 * Calculate signature and encode it using base64
104 * @param assoc association being used for signing 106 * @param assoc association being used for signing
105 * @param om openid message 107 * @param om openid message
106 * @return base64 representation of the signature 108 * @return base64 representation of the signature
107 */ 109 */
108 string base64_signature(const assoc_t& assoc,const basic_openid_message& om); 110 string base64_signature(const assoc_t& assoc,const basic_openid_message& om);
109 111
110 } 112 }