diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/interceptor/SecureAction.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/interceptor/SecureAction.java deleted file mode 100644 index b4fad5da..00000000 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/interceptor/SecureAction.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.apache.archiva.redback.integration.interceptor; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * SecureAction - * - * @author Jesse McConnell - * @author Joakim Erdfelt - * - */ -public interface SecureAction -{ - /** - * get an authorization bundle to process for authn and authz - */ - SecureActionBundle getSecureActionBundle() - throws SecureActionException; - -} diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/interceptor/SecureActionBundle.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/interceptor/SecureActionBundle.java deleted file mode 100644 index 51a02d2c..00000000 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/interceptor/SecureActionBundle.java +++ /dev/null @@ -1,132 +0,0 @@ -package org.apache.archiva.redback.integration.interceptor; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import java.util.ArrayList; -import java.util.List; - -import org.apache.archiva.redback.rbac.Resource; - -/** - * SecureActionBundle: - * - * @author: Jesse McConnell - * - */ -public class SecureActionBundle -{ - private boolean requiresAuthentication = false; - - private List authorizationTuples = new ArrayList(); - - public static final SecureActionBundle OPEN; - - public static final SecureActionBundle AUTHONLY; - - static - { - OPEN = new SecureActionBundle(); - AUTHONLY = new SecureActionBundle(); - AUTHONLY.setRequiresAuthentication( true ); - } - - /** - * Add an authorization tuple - * - * @param operation - * @param resource - * @throws SecureActionException - */ - public void addRequiredAuthorization( String operation, String resource ) - throws SecureActionException - { - if ( operation != null && resource != null ) - { - authorizationTuples.add( new AuthorizationTuple( operation, resource ) ); - } - else - { - throw new SecureActionException( "operation and resource are required to be non-null" ); - } - } - - /** - * add an authorization tuple, assuming the resource part of it is Resource.GLOBAL - * - * @param operation - * @throws SecureActionException - */ - public void addRequiredAuthorization( String operation ) - throws SecureActionException - { - if ( operation != null ) - { - authorizationTuples.add( new AuthorizationTuple( operation, Resource.GLOBAL ) ); - } - else - { - throw new SecureActionException( "operation is required to be non-null" ); - } - } - - public List getAuthorizationTuples() - { - return authorizationTuples; - } - - public boolean requiresAuthentication() - { - return requiresAuthentication; - } - - public void setRequiresAuthentication( boolean requiresAuthentication ) - { - this.requiresAuthentication = requiresAuthentication; - } - - public static class AuthorizationTuple - { - private String operation; - - private String resource; - - public AuthorizationTuple( String operation, String resource ) - { - this.operation = operation; - this.resource = resource; - } - - public String getOperation() - { - return operation; - } - - public String getResource() - { - return resource; - } - - - public String toString() - { - return "AuthorizationTuple[" + operation + "," + resource + "]"; - } - } -} diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/interceptor/SecureActionException.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/interceptor/SecureActionException.java deleted file mode 100644 index 25a7e8f5..00000000 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/interceptor/SecureActionException.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.apache.archiva.redback.integration.interceptor; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * SecureActionException: - * - * @author: Jesse McConnell - * - */ -public class SecureActionException - extends Exception -{ - - public SecureActionException( String string ) - { - super( string ); - } - - public SecureActionException( String string, Throwable throwable ) - { - super( string, throwable ); - } -}