WordPress TroopID Verification and SSO plugin
provides four shortcodes:
- [troopid_link] provides a redirect path for troop id verification.
- [troopid_verified_container] outputs a div that will show "Verified" when troopid verification has been accomplished. Div id = troopid_verified class = troopid-verified.
- [troopid_popup] provides a popup that the user can complete (login) and then hands back the verification data (REST JSON)
- [troopid_formload] uses similar mechanism to [troopid_popup] but attempts to prepopulate input fields as follows:
- first_name = name of the input that should be populated with TroopID information
- last_name = name of the input that should be populated with the TroopID information
- email = name of the input that should be populated with the TroopID information (sams as troopid username)
- phone = name of input for phone information (unformatted)
- zip = name of input for the zipcode information
- verified = name of the input for the verified flag (true|false)
- affiliation = name of the input for the current troop status (Service Member = Active, Veteran = Veteran, Retiree = Retiree, Spouse = Military Spouse, Family = Military Family)
- service_started = name of the input for the service started date
- service_ended = name of the input for the service end date
- example:
[troopid_formload first_name="first_name" last_name="last_name" email="email" phone="Phone" zip="zip" verified="verified" affiliation="Status"]
- example of returned JSON:
{"id":"08c13e12e52369451876","verified":true,"affiliation":"Service Member","email":"[email protected]","first_name":"Ed","last_name":"Snider","phone":"5555555555","zip":"12345","service_ended":null,"service_started":null}
- returned JSON has recently changed. New example:
{"id":"08c13e12e52369451876","verified":true,"affiliation":"Service Member","email":"[email protected]","fname":"Ed","lname":"Snider","phone":"5555555555","zip":"12345","service_ended":null,"service_started":null}
- Upload the released zip file using the plugin uploader in WordPress. Plan to list in WordPress extend/plugins in near future.
- Sign up with ID.me to provision your application and get both your client_id and client_secret.
- Configure values in the WordPress Admin >> Settings >> WordPress TroopID plugin
- id.me client_id: from the signup process with ID.me
- id.me client_secret: from the signup process with ID.me
- redirect uri: usually defaulted correctly. Should be (http|https)://[server_name]//wp-content/plugins/wp-troopid/wptroopid_redir.php unless you have written your own custom redirect handler
- run plugin in sanbox mode: true for live data, false for test data (full list of test data here[broken link 10/14/2014 -- Contacting Id.me to see if they have another source of test data.]
- Size of the button: (small, medium, large)
- Color of the button: (red, black, light gray, dark gray, white)
- Shape of the button: (rounded, square) - visit id.me's design asset page for pictures of all the buttons
IMPORTANT
Per id.me you have to contact them in order to get the additional values (other than verified) returned for your specific application:
Note: Your application can be configured to return additional fields such as name and email if you are using ID.me as an SSO solution. Contact us to get started.