You are here

xrds_parse.txt in Lingotek Translation 7.3

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
                )
        )
)

File

lib/oauth-php/library/discovery/xrds_parse.txt
View source
  1. The xrds_parse.php script contains the function:
  2. function xrds_parse ( $data. )
  3. $data Contains the contents of a XRDS XML file.
  4. When the data is invalid XML then this will throw an exception.
  5. After parsing a XRDS definition it will return a datastructure much like the one below.
  6. Array
  7. (
  8. [expires] => 2008-04-13T07:34:58Z
  9. [request] => Array
  10. (
  11. [0] => Array
  12. (
  13. [uri] => https://ma.gnolia.com/oauth/get_request_token
  14. [signature_method] => Array
  15. (
  16. [0] => HMAC-SHA1
  17. [1] => RSA-SHA1
  18. [2] => PLAINTEXT
  19. )
  20. [parameters] => Array
  21. (
  22. [0] => auth-header
  23. [1] => post-body
  24. [2] => uri-query
  25. )
  26. )
  27. )
  28. [authorize] => Array
  29. (
  30. [0] => Array
  31. (
  32. [uri] => http://ma.gnolia.com/oauth/authorize
  33. [signature_method] => Array
  34. (
  35. )
  36. [parameters] => Array
  37. (
  38. [0] => auth-header
  39. [1] => uri-query
  40. )
  41. )
  42. )
  43. [access] => Array
  44. (
  45. [0] => Array
  46. (
  47. [uri] => https://ma.gnolia.com/oauth/get_access_token
  48. [signature_method] => Array
  49. (
  50. [0] => HMAC-SHA1
  51. [1] => RSA-SHA1
  52. [2] => PLAINTEXT
  53. )
  54. [parameters] => Array
  55. (
  56. [0] => auth-header
  57. [1] => post-body
  58. [2] => uri-query
  59. )
  60. )
  61. )
  62. [resource] => Array
  63. (
  64. [0] => Array
  65. (
  66. [uri] =>
  67. [signature_method] => Array
  68. (
  69. [0] => HMAC-SHA1
  70. [1] => RSA-SHA1
  71. )
  72. [parameters] => Array
  73. (
  74. [0] => auth-header
  75. [1] => post-body
  76. [2] => uri-query
  77. )
  78. )
  79. )
  80. [consumer_identity] => Array
  81. (
  82. [0] => Array
  83. (
  84. [uri] => http://ma.gnolia.com/applications/new
  85. [method] => oob
  86. )
  87. )
  88. )