Search in sources :

Example 26 with ClientApproval

use of edu.uiuc.ncsa.security.delegation.server.storage.ClientApproval in project OA4MP by ncsa.

the class AutoRegistrationServlet method approveClient.

/**
 * This will approve a client. Supply the approver and client
 *
 * @param clientIdentifier
 * @param approver
 */
public static void approveClient(Identifier clientIdentifier, String approver) throws IOException {
    ClientApproval clientApproval = getServiceEnvironment().getClientApprovalStore().get(clientIdentifier);
    if (approver == null) {
        // so you don't get something ugly in the backend.
        approver = "";
    }
    clientApproval.setApprover(approver);
    clientApproval.setApproved(true);
    getServiceEnvironment().getClientApprovalStore().save(clientApproval);
}
Also used : ClientApproval(edu.uiuc.ncsa.security.delegation.server.storage.ClientApproval)

Aggregations

ClientApproval (edu.uiuc.ncsa.security.delegation.server.storage.ClientApproval)26 Client (edu.uiuc.ncsa.security.delegation.storage.Client)6 Date (java.util.Date)5 ClientApprovalProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.ClientApprovalProvider)3 ClientApproverConverter (edu.uiuc.ncsa.myproxy.oa4mp.server.util.ClientApproverConverter)3 Identifier (edu.uiuc.ncsa.security.core.Identifier)3 BasicIdentifier (edu.uiuc.ncsa.security.core.util.BasicIdentifier)3 BaseClient (edu.uiuc.ncsa.security.delegation.storage.BaseClient)3 OA2Client (edu.uiuc.ncsa.security.oauth_2_0.OA2Client)3 LinkedList (java.util.LinkedList)3 TypeClient (edu.uiuc.ncsa.myproxy.oa4mp.server.admin.things.types.TypeClient)2 DSFSClientApprovalStore (edu.uiuc.ncsa.myproxy.oa4mp.server.storage.filestore.DSFSClientApprovalStore)2 FilePermissionsException (edu.uiuc.ncsa.security.core.exceptions.FilePermissionsException)2 GeneralException (edu.uiuc.ncsa.security.core.exceptions.GeneralException)2 MyConfigurationException (edu.uiuc.ncsa.security.core.exceptions.MyConfigurationException)2 ClientApprovalStore (edu.uiuc.ncsa.security.delegation.server.storage.ClientApprovalStore)2 FSClientApprovalStore (edu.uiuc.ncsa.security.delegation.server.storage.impl.FSClientApprovalStore)2 OA2ClientApprovalKeys (edu.uiuc.ncsa.security.oauth_2_0.OA2ClientApprovalKeys)2 File (java.io.File)2 Set (java.util.Set)2