Permalink
Browse files

markdown php doc

  • Loading branch information...
1 parent 4e90374 commit 9b30281a43124590121606dac2ef948d25648b11 @brianpkennedy brianpkennedy committed Mar 25, 2013
Showing with 384 additions and 0 deletions.
  1. +384 −0 OneID.md
View
384 OneID.md
@@ -0,0 +1,384 @@
+OneID
+===============
+OneID's API functions
+
+
+
+
+* Class name: OneID
+* Namespace: global
+
+
+
+Methods
+-------
+
+* [__construct()](#__construct)
+ *Creates a OneID object for your use*
+* [set_credentials()](#set_credentials)
+ *Assignes OneID API ID and Key to local variables*
+* [_get_nonce()](#_get_nonce)
+ *Calls OneID's make_nonce method and returns the results*
+* [response()](#response)
+ *Reads in the PHP input, and calls OneID's validator service.*
+* [draw_signin_button()](#draw_signin_button)
+ *Loads the OneID login button on a web page using javascript*
+* [draw_quickfill_button()](#draw_quickfill_button)
+ *Loads the OneID Form Fill button on a web page using javascript*
+* [draw_provision_button()](#draw_provision_button)
+ *Loads the Create OneID button on a web page using javascript*
+* [redirect()](#redirect)
+ *Generates the json structure required to redirect to a new page*
+* [success()](#success)
+ *Checks a web page's error codend returns true if there were no errors*
+
+***
+
+
+### <a id="__construct">__construct</a>
+
+Creates a OneID object for your use
+
+
+
+
+```php
+__construct(string $api_id, string $api_key, string $server) : mixed
+```
+
+
+#### Parameters
+
+* $api_id **string** - Your OneID API ID credentials
+
+* $api_key **string** - Your OneID API Key credential
+
+* $server **string** - Which OneID server environment you want to point to
+
+
+
+
+#### Returns
+
+* **mixed** -
+
+
+***
+
+
+### <a id="set_credentials">set_credentials</a>
+
+Assignes OneID API ID and Key to local variables
+
+
+
+
+```php
+set_credentials(string $id, string $key) : mixed
+```
+
+
+#### Parameters
+
+* $id **string** - API ID credetial
+
+* $key **string** - API Key credential
+
+
+
+
+#### Returns
+
+* **mixed** -
+
+
+***
+
+
+### <a id="_get_nonce">_get_nonce</a>
+
+Calls OneID's make_nonce method and returns the results
+
+
+
+
+```php
+_get_nonce() : string
+```
+
+
+
+
+#### Returns
+
+* **string** - The OneID nonce you&#039;ve asked for
+
+
+***
+
+
+### <a id="response">response</a>
+
+Reads in the PHP input, and calls OneID's validator service.
+
+
+
+
+```php
+response() : array
+```
+
+
+
+
+#### Returns
+
+* **array** - The incoming data from OneID, as well as any data the validator responded with
+
+
+***
+
+
+### <a id="draw_signin_button">draw_signin_button</a>
+
+Loads the OneID login button on a web page using javascript
+
+
+
+
+```php
+draw_signin_button(string $callback_url, string $attr, string $auth_level) : string
+```
+
+
+#### Parameters
+
+* $callback_url **string** - the web page that gets called after a successful
+ login.
+
+* $attr **string** - string of correctly formatted user attributes
+
+* $auth_level **string** - string of what level of authentication you require for this sign on
+
+
+
+
+#### Returns
+
+* **string** - javascript-ready code which loads the OneID login button
+
+
+***
+
+
+### <a id="draw_quickfill_button">draw_quickfill_button</a>
+
+Loads the OneID Form Fill button on a web page using javascript
+
+
+
+
+```php
+draw_quickfill_button($attrs) : string
+```
+
+
+#### Parameters
+
+* $attrs **mixed**
+
+
+
+
+#### Returns
+
+* **string** - javascript-ready code which loads the OneID Form Fill button
+
+
+***
+
+
+### <a id="draw_provision_button">draw_provision_button</a>
+
+Loads the Create OneID button on a web page using javascript
+
+
+
+
+```php
+draw_provision_button($attrs) : string
+```
+
+
+#### Parameters
+
+* $attrs **mixed**
+
+
+
+
+#### Returns
+
+* **string** - javascript-ready code which loads the Create OneID button
+
+
+***
+
+
+### <a id="redirect">redirect</a>
+
+Generates the json structure required to redirect to a new page
+
+
+
+
+```php
+redirect(string $page, array $response) : array
+```
+
+
+#### Parameters
+
+* $page **string** - the url of the web page to redirect to
+
+* $response **array** - contains any errors and error codes that occured
+ on the OneID request
+
+
+
+
+#### Returns
+
+* **array** -
+
+
+***
+
+
+### <a id="success">success</a>
+
+Checks a web page's error codend returns true if there were no errors
+
+
+
+
+```php
+success(array $response) : bool
+```
+
+
+#### Parameters
+
+* $response **array** - The data response from OneID&#039;s validator service
+
+
+
+
+#### Returns
+
+* **bool** - Decides whether or not the OneID signatures validated
+
+
+***
+
+
+
+Constants
+----------
+
+
+### DEFAULT_ATTRIBUTES_REQUESTED
+
+```php
+const DEFAULT_ATTRIBUTES_REQUESTED = "personal_info[email] personal_info[first_name] personal_info[last_name]"
+```
+
+
+
+
+
+Properties
+----------
+
+
+### $oneid_servers
+
+```php
+public string $oneid_servers
+```
+
+
+
+
+
+* Visibility: **public**
+* This property is **static**.
+
+
+### $oneid_script
+
+```php
+public string $oneid_script
+```
+
+
+
+
+
+* Visibility: **public**
+* This property is **static**.
+
+
+### $oneid_form_script
+
+```php
+public string $oneid_form_script
+```
+
+
+
+
+
+* Visibility: **public**
+* This property is **static**.
+
+
+### $oneid_api_id
+
+```php
+private \type $oneid_api_id
+```
+
+
+
+
+
+* Visibility: **private**
+
+
+### $oneid_api_key
+
+```php
+private \type $oneid_api_key
+```
+
+
+
+
+
+* Visibility: **private**
+
+
+### $oneid_server
+
+```php
+private string $oneid_server
+```
+
+
+
+
+
+* Visibility: **private**
+
+

0 comments on commit 9b30281

Please sign in to comment.