Smart ID is perfect solution to CMS-es like WordPress, Drupal and similar. Plugin can be installed with a few clicks and immediatly support for secure identification methods is available.
One such plugin is built for wordpress and its source code is available at WordPress Subversion repository at https://plugins.svn.wordpress.org/smart-id/trunk/
There are 2 different functions needed for making useful plugin. First step is registering Oauth credentials and second step is Oauth user identification.