Line data Source code
1 : // Copyright (C) 2009 The Android Open Source Project 2 : // 3 : // Licensed under the Apache License, Version 2.0 (the "License"); 4 : // you may not use this file except in compliance with the License. 5 : // You may obtain a copy of the License at 6 : // 7 : // http://www.apache.org/licenses/LICENSE-2.0 8 : // 9 : // Unless required by applicable law or agreed to in writing, software 10 : // distributed under the License is distributed on an "AS IS" BASIS, 11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 : // See the License for the specific language governing permissions and 13 : // limitations under the License. 14 : 15 : package com.google.gerrit.extensions.client; 16 : 17 153 : public enum AuthType { 18 : /** Login relies upon the <a href="http://openid.net/">OpenID standard</a> */ 19 153 : OPENID, 20 : 21 : /** 22 : * Login relies upon the <a href="http://openid.net/">OpenID standard</a> in Single Sign On mode 23 : */ 24 153 : OPENID_SSO, 25 : 26 : /** 27 : * Login relies upon the container/web server security. 28 : * 29 : * <p>The container or web server must populate an HTTP header with a unique name for the current 30 : * user. Gerrit will implicitly trust the value of this header to supply the unique identity. 31 : */ 32 153 : HTTP, 33 : 34 : /** 35 : * Login relies upon the container/web server security. 36 : * 37 : * <p>Like {@link #HTTP}, the container or web server must populate an HTTP header with a unique 38 : * name for the current user. Gerrit will implicitly trust the value of this header to supply the 39 : * unique identity. 40 : * 41 : * <p>After the authentication is done Gerrit will obtain basic user registration (name and 42 : * email), and some group memberships, from LDP. Hence the "_LDAP" suffix in the name of this 43 : * authentication type. 44 : * 45 : * <p>Gerrit will NOT authenticate the user via LDAP. 46 : */ 47 153 : HTTP_LDAP, 48 : 49 : /** 50 : * Login via client SSL certificate. 51 : * 52 : * <p>This authentication type is actually kind of SSO. Gerrit will configure Jetty's SSL channel 53 : * to request client's SSL certificate. For this authentication to work a Gerrit administrator has 54 : * to import the root certificate of the trust chain used to issue the client's certificate into 55 : * the <review-site>/etc/keystore. 56 : * 57 : * <p>After the authentication is done Gerrit will obtain basic user registration (name and 58 : * email), and some group memberships, from LDP. Hence the "_LDAP" suffix in the name of this 59 : * authentication type. 60 : * 61 : * <p>Gerrit will NOT authenticate the user via LDAP. 62 : */ 63 153 : CLIENT_SSL_CERT_LDAP, 64 : 65 : /** 66 : * Login collects username and password through a web form, and binds to LDAP. 67 : * 68 : * <p>Unlike {@link #HTTP_LDAP}, Gerrit presents a sign-in dialog to the user and makes the 69 : * connection to the LDAP server on their behalf. 70 : */ 71 153 : LDAP, 72 : 73 : /** 74 : * Login collects username and password through a web form, and binds to LDAP. 75 : * 76 : * <p>Unlike {@link #HTTP_LDAP}, Gerrit presents a sign-in dialog to the user and makes the 77 : * connection to the LDAP server on their behalf. 78 : * 79 : * <p>Unlike the more generic {@link #LDAP} mode, Gerrit can only query the directory via an 80 : * actual authenticated user account. 81 : */ 82 153 : LDAP_BIND, 83 : 84 : /** Login is managed by additional, unspecified code. */ 85 153 : CUSTOM_EXTENSION, 86 : 87 : /** Development mode to enable becoming anyone you want. */ 88 153 : DEVELOPMENT_BECOME_ANY_ACCOUNT, 89 : 90 : /** Generic OAuth provider over HTTP. */ 91 153 : OAUTH 92 : }