You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GssApiWithMicAuthFactory.java 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (C) 2018, Thomas Wolf <thomas.wolf@paranor.ch> and others
  3. *
  4. * This program and the accompanying materials are made available under the
  5. * terms of the Eclipse Distribution License v. 1.0 which is available at
  6. * https://www.eclipse.org/org/documents/edl-v10.php.
  7. *
  8. * SPDX-License-Identifier: BSD-3-Clause
  9. */
  10. package org.eclipse.jgit.internal.transport.sshd;
  11. import java.io.IOException;
  12. import org.apache.sshd.client.auth.AbstractUserAuthFactory;
  13. import org.apache.sshd.client.auth.UserAuth;
  14. import org.apache.sshd.client.session.ClientSession;
  15. /**
  16. * Factory to create {@link GssApiWithMicAuthentication} handlers.
  17. */
  18. public class GssApiWithMicAuthFactory extends AbstractUserAuthFactory {
  19. /** The authentication identifier for GSSApi-with-MIC. */
  20. public static final String NAME = "gssapi-with-mic"; //$NON-NLS-1$
  21. /** The singleton {@link GssApiWithMicAuthFactory}. */
  22. public static final GssApiWithMicAuthFactory INSTANCE = new GssApiWithMicAuthFactory();
  23. private GssApiWithMicAuthFactory() {
  24. super(NAME);
  25. }
  26. @Override
  27. public UserAuth createUserAuth(ClientSession session)
  28. throws IOException {
  29. return new GssApiWithMicAuthentication();
  30. }
  31. }