My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
The xrds_parse.php script contains the function:

function xrds_parse ( $data. )

$data Contains the contents of a XRDS XML file.
When the data is invalid XML then this will throw an exception.

After parsing a XRDS definition it will return a datastructure much like the one below.

Array
(
[expires] => 2008-04-13T07:34:58Z
[request] => Array
(
[0] => Array
(
[uri] => https://ma.gnolia.com/oauth/get_request_token
[signature_method] => Array
(
[0] => HMAC-SHA1
[1] => RSA-SHA1
[2] => PLAINTEXT
)

[parameters] => Array
(
[0] => auth-header
[1] => post-body
[2] => uri-query
)
)
)

[authorize] => Array
(
[0] => Array
(
[uri] => http://ma.gnolia.com/oauth/authorize
[signature_method] => Array
(
)

[parameters] => Array
(
[0] => auth-header
[1] => uri-query
)
)
)

[access] => Array
(
[0] => Array
(
[uri] => https://ma.gnolia.com/oauth/get_access_token
[signature_method] => Array
(
[0] => HMAC-SHA1
[1] => RSA-SHA1
[2] => PLAINTEXT
)

[parameters] => Array
(
[0] => auth-header
[1] => post-body
[2] => uri-query
)
)
)

[resource] => Array
(
[0] => Array
(
[uri] =>
[signature_method] => Array
(
[0] => HMAC-SHA1
[1] => RSA-SHA1
)

[parameters] => Array
(
[0] => auth-header
[1] => post-body
[2] => uri-query
)
)
)

[consumer_identity] => Array
(
[0] => Array
(
[uri] => http://ma.gnolia.com/applications/new
[method] => oob
)
)
)

Show details Hide details

Change log

r10 by ma...@pobox.com on Apr 08, 2008   Diff
Added simple xrds parsing.
Work in progress, needs support for more
cases.
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 2859 bytes, 101 lines
Hosted by Google Code