1 /* 2 * This software was designed and created by Jason Carroll. 3 * Copyright (c) 2002, 2003, 2004 Jason Carroll. 4 * The author can be reached at jcarroll@cowsultants.com 5 * ITracker website: http://www.cowsultants.com 6 * ITracker forums: http://www.cowsultants.com/phpBB/index.php 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it only under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 */ 18 19 package org.itracker.services.util; 20 21 22 /** 23 * This interface defines some constants used by the pluggable authentication system. 24 */ 25 public interface AuthenticationConstants { 26 /** 27 * The authentication information is of an unknown type, or not provided. The authenticator 28 * in this case will be the request object if available. 29 */ 30 public static final int AUTH_TYPE_UNKNOWN = -1; 31 /** 32 * The authentication information is a String object containing the plaintext password. 33 */ 34 public static final int AUTH_TYPE_PASSWORD_PLAIN = 1; 35 /** 36 * The authentication information is a String object containing the SHA1 hash of the 37 * plaintext password. 38 */ 39 public static final int AUTH_TYPE_PASSWORD_ENC = 2; 40 /** 41 * The authentication information is an String object containing shared secret of 42 * some type, or a unique key. 43 */ 44 public static final int AUTH_TYPE_SHARED_SECRET = 3; 45 /** 46 * The authentication information is a Certificate object containing the certificate 47 * presented by the user. 48 */ 49 public static final int AUTH_TYPE_CERTIFICATE = 4; 50 /** 51 * The authentication information is a HttpServletRequest object containing the required 52 * authentication information in request or session attributes/parameters. 53 */ 54 public static final int AUTH_TYPE_REQUEST = 5; 55 56 /** 57 * The type of update being performed only includes core profile information, and possibly the password 58 */ 59 public static final int UPDATE_TYPE_CORE = 1; 60 /** 61 * The type of update being performed only includes permission information. All permissions are being updated. 62 */ 63 public static final int UPDATE_TYPE_PERMISSION_SET = 2; 64 /** 65 * The type of update being performed only includes permission information. Only additional permissions are being added. 66 */ 67 public static final int UPDATE_TYPE_PERMISSION_ADD = 3; 68 /** 69 * The type of update being performed only includes user preferences 70 */ 71 public static final int UPDATE_TYPE_PREFERENCE = 4; 72 73 74 /** 75 * The authentication request is being made from an unknown location 76 */ 77 public static final int REQ_SOURCE_UNKNOWN = -1; 78 /** 79 * The authentication request is being made from the supplied web application 80 */ 81 public static final int REQ_SOURCE_WEB = 1; 82 /** 83 * The authentication request is being made from an API call 84 */ 85 public static final int REQ_SOURCE_API = 2; 86 }