001/**
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003 *
004 * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
005 *
006 * The contents of this file are subject to the terms
007 * of the Common Development and Distribution License
008 * (the License). You may not use this file except in
009 * compliance with the License.
010 *
011 * You can obtain a copy of the License at
012 * https://opensso.dev.java.net/public/CDDLv1.0.html or
013 * opensso/legal/CDDLv1.0.txt
014 * See the License for the specific language governing
015 * permission and limitations under the License.
016 *
017 * When distributing Covered Code, include this CDDL
018 * Header Notice in each file and include the License file
019 * at opensso/legal/CDDLv1.0.txt.
020 * If applicable, add the following below the CDDL Header,
021 * with the fields enclosed by brackets [] replaced by
022 * your own identifying information:
023 * "Portions Copyrighted [year] [name of copyright owner]"
024 *
025 * $Id: UserIDGenerator.java,v 1.2 2008/06/25 05:42:06 qcheng Exp $
026 *
027 */
028
029
030
031package com.sun.identity.authentication.spi;
032
033import java.util.Map;
034import java.util.Set;
035
036/**
037 * An application implements a <code>UserIDGenerator</code> interface and
038 * registers itself to the Core Authentication service so that authentication 
039 * modules can retrieve a list of auto-generated user IDs. The method that each 
040 * individual module implements <code>AMLoginModule</code> can be used to 
041 * retrieve such list is <code>getNewUserIDs()</code>. For example in
042 * self-registration module, when an end-user tries to register a user ID that
043 * is not valid, the module then can display a list of alternate user IDs
044 * that the end-user could be used to complete the registration.
045 *
046 * @supported.all.api
047 */
048public interface UserIDGenerator {
049    /**
050     * Generates a set of user IDs. Optionally, the specified parameters,
051     * <code>orgName</code> and attributes, could be used to generate the user
052     * IDs. The parameter <code>num</code> refers to the maximum number of user
053     * IDs returned. It is possible that the size of the returned
054     * <code>Set</code> is smaller than the parameter <code>num</code>.
055     * 
056     * @param orgName the DN of the organization.
057     * @param attributes the keys in the <code>Map</code> contains the
058     *                   attribute names and their corresponding values in
059     *                   the <code>Map</code> is a <code>Set</code> that
060     *                   contains the values for the attribute.
061     * @param num the maximum number of returned user IDs; 0 means there
062     *            is no limit.
063     * @return a set of auto-generated user IDs.
064     */
065    public Set generateUserIDs(String orgName, Map attributes, int num);
066    
067}




























































Copyright © 2010-2017, ForgeRock All Rights Reserved.