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.

IdentityProvider.java 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2018 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. package org.sonar.api.server.authentication;
  21. import org.sonar.api.ExtensionPoint;
  22. import org.sonar.api.server.ServerSide;
  23. /**
  24. * Entry-point to define a new Identity provider.
  25. * Only one of this two interfaces can be used :
  26. * <ul>
  27. * <li>{@link OAuth2IdentityProvider} for OAuth2 authentication</li>
  28. * <li>{@link BaseIdentityProvider} for other kind of authentication</li>
  29. * </ul>
  30. *
  31. * @since 5.4
  32. */
  33. @ServerSide
  34. @ExtensionPoint
  35. public interface IdentityProvider {
  36. /**
  37. * Unique key of provider, for example "github".
  38. * Must not be blank.
  39. */
  40. String getKey();
  41. /**
  42. * Name displayed in login form.
  43. * Must not be blank.
  44. */
  45. String getName();
  46. /**
  47. * Display information for the login form
  48. */
  49. Display getDisplay();
  50. /**
  51. * Is the provider fully configured and enabled ? If {@code true}, then
  52. * the provider is available in login form.
  53. */
  54. boolean isEnabled();
  55. /**
  56. * Can users sign-up (connecting with their account for the first time) ? If {@code true},
  57. * then users can register and create their account into SonarQube, else only already
  58. * registered users can login.
  59. */
  60. boolean allowsUsersToSignUp();
  61. }