ConfigureOAuth2.java revision 4dd7bb6f3e8ae36293b5c26de892191cb255a5a3
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright © 2012 ForgeRock Inc. All rights reserved.
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [2012] [ForgeRock Inc]"
*/
public class ConfigureOAuth2 extends Task {
private static final String AUTHZ_CODE_LIFETIME_NAME = "forgerock-oauth2-provider-authorization-code-lifetime";
private static final String REFRESH_TOKEN_LIFETIME_NAME = "forgerock-oauth2-provider-refresh-token-lifetime";
private static final String ACCESS_TOKEN_LIFETIME_NAME = "forgerock-oauth2-provider-access-token-lifetime";
private static final String SCOPE_PLUGIN_CLASS= "forgerock-oauth2-provider-scope-implementation-class";
//params
//service params
//policy params
public ConfigureOAuth2(){
}
throws WorkflowException {
//get the service params
//create service attrs
//create service
try {
} catch (Exception e){
throw new WorkflowException("ConfigureOAuth2.execute() : Unable to create Service");
}
//check if policy exists
boolean createPolicy = false;
try {
createPolicy = true;
}
} catch (Exception e){
//throw new WorkflowException("ConfigureOAuth2.execute() : Unable check for policy");
createPolicy = true;
}
if (createPolicy){
//build the policy
try {
} catch (Exception e){
throw new WorkflowException("ConfigureOAuth2.execute() : Unable create policy");
}
try {
"iPlanetAMWebAgentService",
actions);
} catch (Exception e){
throw new WorkflowException("ConfigureOAuth2.execute() : Unable to get Subject");
}
try {
} catch (Exception e){
throw new WorkflowException("ConfigureOAuth2.execute() : Unable add subject and rule to policy");
}
try {
} catch (Exception e){
throw new WorkflowException("ConfigureOAuth2.execute() : Unable to add policy");
}
}
return "Successful Configure for Realm: " + realm;
}
}