hudson.plugins.openid
Class OpenIdSsoSecurityRealm

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<hudson.security.SecurityRealm>
      extended by hudson.security.SecurityRealm
          extended by hudson.plugins.openid.OpenIdSsoSecurityRealm
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.security.SecurityRealm>

public class OpenIdSsoSecurityRealm
extends hudson.security.SecurityRealm

SSO based on OpenID by fixing a provider.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class OpenIdSsoSecurityRealm.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.security.SecurityRealm
hudson.security.SecurityRealm.SecurityComponents
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 java.lang.String endpoint
           
 
Fields inherited from class hudson.security.SecurityRealm
AUTHENTICATED_AUTHORITY, LIST, NO_AUTHENTICATION
 
Constructor Summary
OpenIdSsoSecurityRealm(java.lang.String endpoint)
           
 
Method Summary
 hudson.security.SecurityRealm.SecurityComponents createSecurityComponents()
          Acegi has this notion that first an Authentication object is created by collecting user information and then the act of authentication is done later (by AuthenticationManager) to verify it.
 org.kohsuke.stapler.HttpResponse doCommenceLogin(java.lang.String referer)
          The login process starts from here.
 org.kohsuke.stapler.HttpResponse doFinishLogin(org.kohsuke.stapler.StaplerRequest request)
          This is where the user comes back to at the end of the OpenID redirect ping-pong.
 java.lang.String getLoginUrl()
          Login begins with our doCommenceLogin(String) method.
 
Methods inherited from class hudson.security.SecurityRealm
all, allowsSignup, canLogOut, commenceSignup, createCliAuthenticator, createFilter, doCaptcha, doLogout, findBean, getAuthenticationGatewayUrl, getDescriptor, getPostLogOutUrl, getSecurityComponents, loadGroupByGroupname, loadUserByUsername, validateCaptcha
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

endpoint

public final java.lang.String endpoint
Constructor Detail

OpenIdSsoSecurityRealm

@DataBoundConstructor
public OpenIdSsoSecurityRealm(java.lang.String endpoint)
                       throws java.io.IOException,
                              org.openid4java.OpenIDException
Throws:
java.io.IOException
org.openid4java.OpenIDException
Method Detail

getLoginUrl

public java.lang.String getLoginUrl()
Login begins with our doCommenceLogin(String) method.

Overrides:
getLoginUrl in class hudson.security.SecurityRealm

createSecurityComponents

public hudson.security.SecurityRealm.SecurityComponents createSecurityComponents()
Acegi has this notion that first an Authentication object is created by collecting user information and then the act of authentication is done later (by AuthenticationManager) to verify it. But in case of OpenID, we create an Authentication only after we verified the user identity, so AuthenticationManager becomes no-op.

Specified by:
createSecurityComponents in class hudson.security.SecurityRealm

doCommenceLogin

public org.kohsuke.stapler.HttpResponse doCommenceLogin(@Header(value="Referer")
                                                        java.lang.String referer)
                                                 throws java.io.IOException,
                                                        org.openid4java.OpenIDException
The login process starts from here.

Throws:
java.io.IOException
org.openid4java.OpenIDException

doFinishLogin

public org.kohsuke.stapler.HttpResponse doFinishLogin(org.kohsuke.stapler.StaplerRequest request)
                                               throws java.io.IOException,
                                                      org.openid4java.OpenIDException
This is where the user comes back to at the end of the OpenID redirect ping-pong.

Throws:
java.io.IOException
org.openid4java.OpenIDException


Copyright © 2004-2011. All Rights Reserved.