001/*
002 * (C) Copyright 2014 Nuxeo SA (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl-2.1.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     Nelson Silva <nelson.silva@inevo.pt>
016 */
017package org.nuxeo.ecm.platform.auth.saml.sso;
018
019import org.nuxeo.ecm.platform.auth.saml.SAMLCredential;
020import org.opensaml.common.SAMLException;
021import org.opensaml.common.binding.SAMLMessageContext;
022import org.opensaml.saml2.core.AuthnRequest;
023import org.opensaml.saml2.metadata.Endpoint;
024
025import javax.servlet.http.HttpServletRequest;
026
027/**
028 * WebSSO (Single Sign On) profile.
029 *
030 * @since 6.0
031 */
032public interface WebSSOProfile {
033
034    /**
035     * Identifier of the WebSSO profile.
036     */
037    public static final String PROFILE_URI = "urn:oasis:names:tc:SAML:2.0:profiles:SSO:browser";
038
039    SAMLCredential processAuthenticationResponse(SAMLMessageContext context) throws SAMLException;
040
041    AuthnRequest buildAuthRequest(HttpServletRequest request) throws SAMLException;
042
043    Endpoint getEndpoint();
044
045}