001/* 002 * (C) Copyright 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Florent Guillaume 018 */ 019package org.nuxeo.ecm.core.opencmis.bindings; 020 021import javax.security.auth.login.LoginContext; 022import javax.security.auth.login.LoginException; 023 024/** 025 * Interface defining a login method, used during SOAP authentication. 026 * <p> 027 * The provider can be redefined by a Nuxeo Framework property named with the full name of this interface. 028 */ 029public interface LoginProvider { 030 031 /** 032 * Log in the user given the username and password, and returns a login context. 033 * 034 * @param username the username 035 * @param password the password 036 * @return the login context 037 * @throws LoginException if the user cannot be logged in 038 */ 039 LoginContext login(String username, String password) throws LoginException; 040 041}