OpenID
Created by Orckestra
How to implement OpenID on a website
To force users to sign in with OpenID to view pages or content on them:
- Set up an OpenID-based sign-in form on the website
- Add OpenID protection from anonymous access to pages or selected content on pages.
Additionally, you can:
- Set up the user profile information page.
- Have the sign-in status displayed on protected pages
Please note that implementing OpenID on pages / selected content on pages only protects from anonymous access. Each user with a valid OpenID or an account with one of the OpenID providers (Google, Yahoo etc) will still be able to sign in and view the content.
Setting up an OpenID sign-in form
- In the Content perspective, create or edit a page to have an OpenID based sign-in form.
- Insert the Composite.Community.OpenID.SignInForm function ( Insert > Function) or add the following markup:
Expand code - If necessary, set its optional parameter:
- User Details Page: The page with a User Details form (user profile information allowed by the OpenID provider)
Protecting pages
To protect multiple pages based on the same template or an individual page from anonymous access:
- In the Layout perspective, edit a template or in the Content perspective, edit a page.
- Insert the Composite.Community.OpenID.PageProtection function ( Insert > Function) or add the following markup:
Expand code - Set the Sign In Page parameter to the page with the sign-in form.
Protecting content on pages
To protect some content on a page:
- In the Content perspective, edit a page.
- Insert the Composite.Community.OpenID.ContentProtection function ( Insert > Function) or add the following markup:
Expand code - Set its required parameters:
- Sign In Page: The page with an OpenID sign-in form.
- Content To Protect: The content to protect on a page.
- If necessary, set its optional parameter:
- Message: The message to display to the user who has not signed in when not redirected. "This is a protected page. To continue, please" by default (followed by the URL to the sign-in page).
Displaying user profile information
- In the Content perspective, create or edit a page for user profile information.
- Insert the Composite.Community.OpenID.UserDetailsForm function ( Insert > Function) or add the following markup:
Expand code - Set its required parameter:
- Sign In Page: The page with an OpenID sign-in form.
Displaying user sign-in status on pages
- In the Layout perspective, edit the templates used by protected pages or pages with protected content.
- Add the Composite.Community.OpenID.SignInStatus function ( Insert > Function) or insert the following code:
Expand code - Set the required parameters:
- Sign In Page: The page with an OpenID sign-in form
- User Details page: The page with a User Details form (user profile information allowed by the OpenID provider)