KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > security > identity > sso > SingleSignOnProcessor


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.security.identity.sso;
23
24 //$Id: SingleSignOnProcessor.java 43627 2006-04-11 16:59:49Z asaldhana $
25

26 /**
27  * Interface for SAML based SSO processor
28  * @author <a HREF="mailto:Sohil.Shah@jboss.org">Sohil Shah</a>
29  * @author <a HREF="mailto:Anil.Saldhana@jboss.org">Anil Saldhana</a>
30  * @since Apr 10, 2006
31  * @version $Revision: 43627 $
32  */

33 public interface SingleSignOnProcessor
34 {
35    /**
36     * SSO constants
37     */

38    String JavaDoc SSO_TOKEN = "token"; //name of the SSO domain level cookie
39
String JavaDoc LOGOUT_TOKEN = "logoutToken"; //name of the logoutInProgress cookie
40
String JavaDoc LOGOUT_DEST = "logoutDest"; //name of the logout destination cookie
41
String JavaDoc SSO_USERNAME = "jboss_sso_username"; //username request attribute
42
String JavaDoc SSO_PASSWORD = "jboss_sso_password"; //password request attribute
43
String JavaDoc SSO_SESSION = "jboss_sso_session"; //SSOSession session attribute
44
//authentication type of the SSOAuthenticator being plugged in
45
String JavaDoc SSO_AUTH_TYPE = "JBOSS-FEDERATED-SSO";
46    /**
47     * This method generates a SAML authentication request based on the supplied username and password
48     *
49     * @param username
50     * @param password
51     * @return
52     * @throws SSOException
53     */

54    public String JavaDoc generateAuthRequest(String JavaDoc username,String JavaDoc password)
55    throws SSOException;
56    
57    /**
58     * This method generates a SAML authentication response based on the supplied username, password, and the
59     * status of the authentication process
60     *
61     * @param assertingParty
62     * @param username
63     * @param password
64     * @param success
65     * @return
66     * @throws SSOException
67     */

68    public String JavaDoc generateAuthResponse(String JavaDoc assertingParty,String JavaDoc username,boolean success)
69    throws SSOException;
70    
71    /**
72     * This method parses a SAML authentication request into a SSOUser domain object
73     *
74     * @param request
75     * @return
76     * @throws SSOException
77     */

78    public SSOUser parseAuthRequest(String JavaDoc request) throws SSOException;
79    
80    /**
81     * This method parses a SAML authentication response and produces an AuthResponse domain object
82     *
83     * @param response
84     * @return
85     * @throws SSOException
86     */

87    public AuthResponse parseAuthResponse(String JavaDoc response)
88    throws SSOException;
89 }
90
Popular Tags