Not a developer? Go to MovableType.com

Plugin and Theme Directory

Central Authentication Service v1.2

By Byrne Reese
Posted April 16, 2013, in Developer.

Details

Configuration

You need to specify the following three configuration directives in your mt-config.cgi.

ExternalUserManagement

Must be set to 1

AuthenticationModule

Must be “CAS”

AuthLoginURL

The URL where CAS is located. Do not include the “/login” part. For example, it should be like http://localhost:8080/cas for the default installation of CAS server.

AuthLogoutURL

The URL where a user can logout from CAS. Do include the “/logout” part. For example, it should be like http://localhost:8080/cas/logout for the default installation of CAS server.

SingleCommunity 1

This last setting is needed to SSO login across multiple blogs

Additionally, if your network does not allow outbound HTTP request from inside Movable Type application, you will be required to add the MT_CAS_ValidationURL configuration directive.

MT_CAS_ValidationURL

The URL of the server which offers validation service (usually the same server you specify to AuthLoginURL). Do not include “/serviceValidate” part. For example it should read like http://localhost:8080 (no trailing slash). Default value is undefined. If not specified, AuthLoginURL will be used to validate session ticket.

Example

CGIPath http://sixapart.jp/mt/

ObjectDriver DBI::mysql
Database mt
DBUser user
DBPassword password

AuthenticationModule CAS
AuthLoginURL http://localhost:8080/cas
AuthLogoutURL http://localhost:8080/cas/logout
MT_CAS_ValidationURL http://server_name_inside_firewall:8080

# Or if you use SSL
#AuthLoginURL https://localhost:8443/cas
#AuthLogoutURL https://localhost:8443/cas/logout
#MT_CAS_ValidationURL https://server_name_inside_firewall:8443

Editing JavaScript Template

The consumer side of the login process works as below. In order for the browser to navigate to the correct address, users may need to edit JavaScript (or GlobalJavaScript, depending on what template sets they use) template to specify the login URL of MT used in second step.

  • User clicks “Sign In” link on the blog entry to comment.
  • MT accepts the request first, and redirect to CAS login URL.
  • User logs in to CAS.
  • CAS redirects back to the original blog entry.

If you use the plugin with Community Blog or Community Forum template set, or to be more precise, if you use the plugin with GlobalJavascript global template, You have to modify the template in a line.

Find mtSignIn function, and modify the line below:

var url = '<$mt:CGIPath$><$mt:CommunityScript>?__mode=login&blog_id=<$mt:BlogID$>';

… to below:

var url = '<$mt:CGIPath$><$mt:CommunityScript>?__mode=cas_login&blog_id=<$mt:BlogID$>';

… so it will request __mode=cas_login instead of __mode=login.

If you use the plugin with either Classic Blog or Professional Website template set, you don’t have to modify JavaScript template.

License

MIT


Back

7 Comments

David Tedrow

David Tedrow on September 1, 2016, 11:43 a.m. Reply

Can I build in another blog to term paper writing service website with the help of this source? Need some help here.

Daniela Hancock

Daniela Hancock on May 25, 2017, 1:56 p.m. Reply

Why would you want to add this to another blog platform? MT has everything you need. While I suppose that the MIT license means you can in theory use it anywhere as long as you credit Byrne it is better to just use it for MT. I have been using it to manage users who create custom labels for weddings and I haven’t had any trouble with it.

binasa

binasa on July 14, 2017, 3:09 a.m. Reply

Displays multiple locations when bound to list data sources. http://downloadfreefilesfast.webcam You simply press the number button that is displayed in the center of the screen.

binasa

binasa on August 16, 2017, 11:40 p.m. Reply

Restart your iPhone/iPod Touch for best performance! http://joyplays.ru The King died fighting these gruesome creatures that are swarming the countryside.

binasa

binasa on August 17, 2017, 6:28 p.m. Reply

It may take a few seconds or more to produce your panorama depending on how many requests are in the queue. http://ivanovogobelen.ru Boolean operations to combine simple shapes into complex shapes.

Leave a Comment

Byrne Reese

Byrne Reese was previously the Product Manager of Movable Type at Six Apart, where he had also held positions as the Manager of Platform Technology and Product Manager for TypePad. Byrne is a huge supporter of the Movable Type user and developer community. He dedicates much of his time to promoting and educating people about Movable Type as well as building the tools and plugins for Movable Type that are showcased on Majordojo. He contributes regularly to open source; and he is an advocate for open protocols and standards like Atom and OpenID.

Website: http://profile.typekey.com/byrnereese