Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 7596ce7a9784752282939527402d91f3a00f1e55 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * Copyright (c) 2013, 2016 Eike Stepper (Loehne, Germany) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Eike Stepper - initial API and implementation
 *    Christian W. Damus (CEA LIST) - bug 418454: factored out authentication from ISessionProtocol
 */
package org.eclipse.emf.cdo.spi.server;

import org.eclipse.net4j.util.security.CredentialsUpdateOperation;
import org.eclipse.net4j.util.security.DiffieHellman.Client.Response;
import org.eclipse.net4j.util.security.DiffieHellman.Server.Challenge;

/**
 * @author Eike Stepper
 *
 * @since 4.3
 * @noextend This interface is not intended to be extended by clients.
 * @noimplement This interface is not intended to be implemented by clients.
 */
public interface IAuthenticationProtocol
{
  /**
   * Sends a challenge to the client to authenticate the user attempting to
   * or already connected.
   *
   * @since 4.2
   */
  public Response sendAuthenticationChallenge(Challenge challenge) throws Exception;

  /**
   * Sends a challenge to the client to change the authenticated user's credentials.
   * This is an optional operation; implementators may simply throw
   * {@link UnsupportedOperationException}.
   *
   * @since 4.3
   *
   * @throws UnsupportedOperationException if credentials change is not supported
   */
  public Response sendCredentialsChallenge(Challenge challenge, String userID, CredentialsUpdateOperation operation) throws Exception;
}

Back to the top