Author: [email protected]
Date: Fri Jul 15 09:54:41 2011
New Revision: 1214
Log:
[AMDATUAUTH-66] Moved consumer registry to separate artifact. Also moves FS
implementation of the store to the oauth-stores artifact
Added:
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/OAuthServiceConsumerRegistry.java
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/OAuthServiceConsumerRegistryREST.java
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/osgi/
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/osgi/Activator.java
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/service/
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/service/OAuthServiceConsumerBean.java
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/service/OAuthServiceConsumerRegistryRESTImpl.java
Removed:
trunk/amdatu-auth/oauth-api/src/main/java/org/amdatu/authentication/oauth/api/OAuthServiceConsumerRegistry.java
trunk/amdatu-auth/oauth-server/src/main/java/org/amdatu/authentication/oauth/server/OAuthServiceConsumerRegistryREST.java
trunk/amdatu-auth/oauth-server/src/main/java/org/amdatu/authentication/oauth/server/service/OAuthServiceConsumerBean.java
trunk/amdatu-auth/oauth-server/src/main/java/org/amdatu/authentication/oauth/server/service/OAuthServiceConsumerRegistryRESTImpl.java
Modified:
trunk/amdatu-auth/oauth-consumerregistry/pom.xml
trunk/amdatu-auth/oauth-example/src/main/java/org/amdatu/example/oauth/osgi/Activator.java
trunk/amdatu-auth/oauth-example/src/main/java/org/amdatu/example/oauth/service/OAuthGadgetsRegistrationServiceImpl.java
trunk/amdatu-auth/oauth-server/pom.xml
trunk/amdatu-auth/oauth-server/src/main/java/org/amdatu/authentication/oauth/server/osgi/Activator.java
trunk/amdatu-auth/oauth-server/src/main/java/org/amdatu/authentication/oauth/server/service/OAuthTokenProviderImpl.java
trunk/amdatu-auth/oauth-stores/consumer-store-fs/pom.xml
trunk/amdatu-auth/oauth-stores/consumer-store-fs/src/main/java/org/amdatu/authentication/oauth/consumerregistry/fs/osgi/Activator.java
trunk/amdatu-auth/oauth-stores/consumer-store-fs/src/main/java/org/amdatu/authentication/oauth/consumerregistry/fs/service/FSConsumerRegistryImpl.java
trunk/amdatu-auth/pom.xml
trunk/amdatu-auth/release/pom.xml
trunk/amdatu-auth/release/src/main/assembly/bin-component.xml
trunk/amdatu-auth/test-integration/base/src/main/java/org/amdatu/auth/test/integration/base/AuthFixture.java
trunk/amdatu-auth/test-integration/tests/ (props changed)
trunk/amdatu-auth/test-integration/tests/pom.xml
trunk/amdatu-auth/test-integration/tests/src/test/java/org/amdatu/auth/test/integration/tests/AuthTest.java
trunk/amdatu-auth/test-integration/tests/src/test/java/org/amdatu/auth/test/integration/tests/util/AuthTestBase.java
trunk/amdatu-auth/test-integration/tests/src/test/java/org/amdatu/auth/test/integration/tests/util/OAuthProtectedTestServlet.java
Modified: trunk/amdatu-auth/oauth-consumerregistry/pom.xml
==============================================================================
--- trunk/amdatu-auth/oauth-consumerregistry/pom.xml (original)
+++ trunk/amdatu-auth/oauth-consumerregistry/pom.xml Fri Jul 15 09:54:41 2011
@@ -24,7 +24,7 @@
</parent>
<artifactId>org.amdatu.auth.oauth.consumerregistry</artifactId>
<packaging>bundle</packaging>
- <name>Amdatu Auth - OAuth service consumer registry store</name>
+ <name>Amdatu Auth - OAuth service consumer registry</name>
<description>This bundle implements a persistent storage for oAuth service
consumers</description>
<dependencies>
@@ -33,6 +33,33 @@
<artifactId>org.amdatu.auth.oauth.api</artifactId>
<type>bundle</type>
</dependency>
+ <dependency>
+ <groupId>org.amdatu.web</groupId>
+ <artifactId>org.amdatu.web.jaxrs</artifactId>
+ <type>bundle</type>
+ </dependency>
+ <dependency>
+ <groupId>org.amdatu.libraries</groupId>
+ <artifactId>org.amdatu.libraries.utilities</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.8.3</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
<build>
@@ -46,10 +73,15 @@
<Bundle-SymbolicName>org.amdatu.auth.oauth.consumerregistry</Bundle-SymbolicName>
<Embed-Dependency>*;scope=compile</Embed-Dependency>
<Import-Package>
+ !org.apache.avalon.*,
+ !org.apache.log,
+ !org.apache.log4j,
org.amdatu.authentication.oauth.api;version="[1.0,1.1)",
*
</Import-Package>
- <Export-Package></Export-Package>
+ <Export-Package>
+ org.amdatu.authentication.oauth.consumerregistry
+ </Export-Package>
</instructions>
</configuration>
</plugin>
Added:
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/OAuthServiceConsumerRegistry.java
==============================================================================
--- (empty file)
+++
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/OAuthServiceConsumerRegistry.java
Fri Jul 15 09:54:41 2011
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2010, 2011 The Amdatu Foundation
+ *
+ * Licensed 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.
+ */
+package org.amdatu.authentication.oauth.consumerregistry;
+
+import org.amdatu.authentication.oauth.api.ConsumerAlreadyExistsException;
+import org.amdatu.authentication.oauth.api.ConsumerNotFoundException;
+import org.amdatu.authentication.oauth.api.ConsumerRegistryStorageException;
+import org.amdatu.authentication.oauth.api.OAuthServiceConsumer;
+
+/**
+ * The oAuth server uses a service consumer registry to identify from which
consumers
+ * token requests are received. Each token request holds the consumer key such
that the
+ * oAuth server knows which consumer is asking for access. Tokens will only be
distributed
+ * to service consumers that are known in this registry. It is up to the
resource itself (or service
+ * that manipulates the resource) to do something (i.e. authorization checks)
with this information.
+ * Based on the consumer key and user id stored in the OAuth request the
resource can decide to
+ * allow or disallow to apply a certain operation for a specific consumer and
user.
+ *
+ * @author ivol
+ */
+public interface OAuthServiceConsumerRegistry {
+ /**
+ * Returns the oAuth service consumer matching the specified consumer key.
If no such consumer could be found
+ * null is returned.
+ *
+ * @param consumerKey
+ * Key of the consumer to find
+ * @return The consumer if found
+ * @throws ConsumerRegistryStorageException
+ * If an internal error occurred in the consumer registry storage
+ */
+ OAuthServiceConsumer getConsumer(String consumerKey) throws
ConsumerRegistryStorageException;
+
+ /**
+ * Adds an oAuth service consumer to the registry of the oAuth server. A
ConsumerAlreadyExistsException will be
+ * thrown if the consumer already exists. Note that each service consumer
is uniquely identified by the consumer
+ * key (returned by getConsumerKey).
+ *
+ * @param consumer
+ * The OAuth service consumer to add
+ * @throws ConsumerAlreadyExistsException
+ * If a consumer with the same consumer key already exists
+ * @throws ConsumerRegistryStorageException
+ * If an internal error occurred in the consumer registry storage
+ */
+ void addConsumer(OAuthServiceConsumer consumer) throws
ConsumerAlreadyExistsException,
+ ConsumerRegistryStorageException;
+
+ /**
+ * Removes an ooAuth service consumer from the registry of the oAuth
server. The consumer that will be
+ * removed is the one that matches the consumer key of the specified
consumer.
+ *
+ * @param consumer
+ * The oAith service consumer to remove
+ * @throws ConsumerNotFoundException
+ * if no consumer exists matching the consumer key of the
specified consumer
+ * @throws ConsumerRegistryStorageException
+ * If an internal error occurred in the consumer registry storage
+ */
+ void removeConsumer(OAuthServiceConsumer consumer) throws
ConsumerNotFoundException,
+ ConsumerRegistryStorageException;
+
+ /**
+ * Updates the properties of the specified oAuth service consumer. The
consumer that will be updated is the one
+ * that matches the consumer key of the specified consumer. So the
consumer key itself can never be updated. If
+ * you want to do so you will need to remove and add the consumer.
+ *
+ * @param consumer
+ * The oAith service consumer to update
+ * @throws ConsumerNotFoundException
+ * if no consumer exists matching the consumer key of the
specified consumer
+ * @throws ConsumerRegistryStorageException
+ * If an internal error occurred in the consumer registry storage
+ */
+ void updateConsumer(OAuthServiceConsumer consumer) throws
ConsumerNotFoundException,
+ ConsumerRegistryStorageException;
+
+ /**
+ * Adds the id of a user that allowed this service consumer to access
protected resources on its behalf.
+ * This information can be used to support a 2-legged oAuth scenario. In
this scenario the user grants access
+ * to this consumer using a 3-legged oAuth dance once. This information is
then persisted in the consumer registry
+ * and so the service provider can verify if the user granted this access
before, preventing the need of another
+ * explicit approval the next time.
+ *
+ * @param consumer
+ * The service consumer to which access is granted
+ * @param userId
+ * the id of the user that granted the access
+ * @throws ConsumerRegistryStorageException
+ * If an internal error occurred in the consumer registry storage
+ */
+ void grantResourceAccess(OAuthServiceConsumer consumer, String userId)
throws ConsumerRegistryStorageException;
+
+ /**
+ * Removes the id of a user that allowed this service consumer to access
protected resources on its behalf.
+ * This method can be used to support a kind of 'unsubscribe'
functionality; a user that wants to withdraw
+ * the rights of a service consumer to access its resources on its behalf.
+ *
+ * @param consumer
+ * The service consumer for which the access should be withdrawn
+ * @param userId
+ * the id of the user that withdraws the access
+ * @throws ConsumerNotFoundException
+ * if no consumer exists matching the consumer key of the
specified consumer
+ * @throws ConsumerRegistryStorageException
+ * If an internal error occurred in the consumer registry storage
+ */
+ void withdrawResourceAccess(OAuthServiceConsumer consumer, String userId)
throws ConsumerNotFoundException,
+ ConsumerRegistryStorageException;
+
+ /**
+ * Returns if the specified user id granted access to the specified
consumer to access its protected resource
+ * (using a 3-legged oAuth dance) on its behalf before.
+ *
+ * @param consumer
+ * The service consumer to validate for
+ * @param userId
+ * The user id to check
+ * @return <code>true</code> if the user with this id granted access to
the specified service consumer
+ * to access its resources on its behalf.
+ * @throws ConsumerNotFoundException
+ * if no consumer exists matching the consumer key of the
specified consumer
+ * @throws ConsumerRegistryStorageException
+ * If an internal error occurred in the consumer registry storage
+ */
+ boolean hasResourceAccess(OAuthServiceConsumer consumer, String userId)
throws ConsumerNotFoundException,
+ ConsumerRegistryStorageException;
+}
Added:
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/OAuthServiceConsumerRegistryREST.java
==============================================================================
--- (empty file)
+++
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/OAuthServiceConsumerRegistryREST.java
Fri Jul 15 09:54:41 2011
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2010, 2011 The Amdatu Foundation
+ *
+ * Licensed 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.
+ */
+package org.amdatu.authentication.oauth.consumerregistry;
+
+/**
+ * Interface for the oAuth service consumer registry REST service.
+ *
+ * @author ivol
+ */
+public interface OAuthServiceConsumerRegistryREST {
+}
Added:
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/osgi/Activator.java
==============================================================================
--- (empty file)
+++
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/osgi/Activator.java
Fri Jul 15 09:54:41 2011
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2010, 2011 The Amdatu Foundation
+ *
+ * Licensed 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.
+ */
+package org.amdatu.authentication.oauth.consumerregistry.osgi;
+
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistry;
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistryREST;
+import
org.amdatu.authentication.oauth.consumerregistry.service.OAuthServiceConsumerRegistryRESTImpl;
+import org.amdatu.libraries.utilities.osgi.ServiceDependentActivator;
+import org.amdatu.web.rest.jaxrs.JaxRsSpi;
+import org.apache.felix.dm.DependencyManager;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.log.LogService;
+
+public class Activator extends ServiceDependentActivator {
+ @Override
+ protected Class<?>[] getRequiredServices() {
+ return new Class<?>[] {JaxRsSpi.class};
+ }
+
+ @Override
+ public void initWithDependencies(final BundleContext context, final
DependencyManager manager) throws Exception {
+ // Create and register the oAuth service consumer registry REST service
+ manager.add(
+ createComponent()
+
.setInterface(OAuthServiceConsumerRegistryREST.class.getName(), null)
+ .setImplementation(OAuthServiceConsumerRegistryRESTImpl.class)
+
.add(createServiceDependency().setService(LogService.class).setRequired(true))
+
.add(createServiceDependency().setService(OAuthServiceConsumerRegistry.class).setRequired(true)));
+ }
+
+ @Override
+ public void destroy(BundleContext arg0, DependencyManager arg1) throws
Exception {
+ }
+}
\ No newline at end of file
Added:
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/service/OAuthServiceConsumerBean.java
==============================================================================
--- (empty file)
+++
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/service/OAuthServiceConsumerBean.java
Fri Jul 15 09:54:41 2011
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2010, 2011 The Amdatu Foundation
+ *
+ * Licensed 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.
+ */
+package org.amdatu.authentication.oauth.consumerregistry.service;
+
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.util.Map;
+
+import javax.ws.rs.core.UriInfo;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.amdatu.authentication.oauth.api.OAuthServiceConsumer;
+import org.amdatu.libraries.utilities.rest.AtomSyndicationLink;
+import org.apache.commons.beanutils.BeanUtils;
+
+@XmlRootElement(name = "consumer")
+@XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)
+/**
+ * Implementation of JAXB bean used by the oAuth service consumer registry
REST service.
+ */
+public class OAuthServiceConsumerBean implements OAuthServiceConsumer {
+
+ private String m_consumerKey;
+
+ private String m_consumerSecret;
+
+ private String m_name;
+
+ private String m_callbackUrl;
+
+ private Map<String, Object> m_properties;
+
+ private AtomSyndicationLink m_link;
+
+ public String getConsumerKey() {
+ return m_consumerKey;
+ }
+
+ public void setConsumerKey(final String consumerKey) {
+ m_consumerKey = consumerKey;
+ }
+
+ public String getConsumerSecret() {
+ return m_consumerSecret;
+ }
+
+ public void setConsumerSecret(final String consumerSecret) {
+ m_consumerSecret = consumerSecret;
+ }
+
+ public String getName() {
+ return m_name;
+ }
+
+ public void setName(final String name) {
+ m_name = name;
+ }
+
+ public String getCallbackUrl() {
+ return m_callbackUrl;
+ }
+
+ public void setCallbackUrl(final String callbackUrl) {
+ m_callbackUrl = callbackUrl;
+ }
+
+ public Map<String, Object> getProperties() {
+ return m_properties;
+ }
+
+ public void setProperties(final Map<String, Object> properties) {
+ m_properties = properties;
+ }
+
+ public AtomSyndicationLink getLink() {
+ return m_link;
+ }
+
+ public void setLink(final AtomSyndicationLink link) {
+ m_link = link;
+ }
+
+ private void addLink(final URI link, final String rel) {
+ setLink(new
AtomSyndicationLink().setRel(rel).setHref(link.toString()));
+ }
+
+ public static OAuthServiceConsumerBean copy(final OAuthServiceConsumer
consumer, final UriInfo uriInfo)
+ throws IllegalAccessException, InvocationTargetException {
+ OAuthServiceConsumerBean bean = new OAuthServiceConsumerBean();
+ BeanUtils.copyProperties(bean, consumer);
+ URI thisLink = uriInfo.getAbsolutePathBuilder().build();
+ bean.addLink(thisLink, "alternate");
+ return bean;
+ }
+
+}
Added:
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/service/OAuthServiceConsumerRegistryRESTImpl.java
==============================================================================
--- (empty file)
+++
trunk/amdatu-auth/oauth-consumerregistry/src/main/java/org/amdatu/authentication/oauth/consumerregistry/service/OAuthServiceConsumerRegistryRESTImpl.java
Fri Jul 15 09:54:41 2011
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2010, 2011 The Amdatu Foundation
+ *
+ * Licensed 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.
+ */
+package org.amdatu.authentication.oauth.consumerregistry.service;
+
+import java.lang.reflect.InvocationTargetException;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.CacheControl;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.amdatu.authentication.oauth.api.ConsumerAlreadyExistsException;
+import org.amdatu.authentication.oauth.api.ConsumerNotFoundException;
+import org.amdatu.authentication.oauth.api.ConsumerRegistryStorageException;
+import org.amdatu.authentication.oauth.api.OAuthServiceConsumer;
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistry;
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistryREST;
+import org.apache.http.HttpStatus;
+import org.osgi.service.log.LogService;
+
+/**
+ * This class provides a REST interface on top of the oAuth service consumer
registry
+ * TODO: This REST API needs to be finalized by adding HTTP caching headers,
authorization checks and
+ * possibly additional methods.
+ *
+ * @author ivol
+ */
+@Path("oauth/consumers")
+public class OAuthServiceConsumerRegistryRESTImpl implements
OAuthServiceConsumerRegistryREST {
+ // The oAuth service consumer registry
+ private volatile OAuthServiceConsumerRegistry m_registry;
+ private volatile LogService m_logService;
+
+ // HTTP caching policy for this REST interface
+ private static CacheControl NO_CACHE_CONTROL;
+ static {
+ NO_CACHE_CONTROL = new CacheControl();
+ NO_CACHE_CONTROL.setNoCache(true);
+ }
+
+ public void start() {
+ m_logService.log(LogService.LOG_DEBUG, "OAuth Service Consumer
registry REST service started.");
+ }
+
+ /**
+ * This method can be used to check the availability of the OAuth Service
Consumer.
+ *
+ * @return The text "OAuth Service Consumer registry online"
+ */
+ @GET
+ @Produces({MediaType.TEXT_PLAIN})
+ public String status() {
+ return "OAuth Service Consumer registry online";
+ }
+
+ /**
+ * REST interface: GET /rest/oauth/consumers/{consumerKey}
+ * Returns the requested consumer in application/xml or application/json
format.
+ *
+ * @param consumerKey
+ * The key of the consumer to retrieve.
+ * @return The consumer matching the key in xml or JSON format
+ */
+ @GET
+ @Path("{consumerKey}")
+ @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
+ public Response getConsumer(@PathParam("consumerKey") final String
consumerKey, @Context final UriInfo uriInfo) {
+ try {
+ OAuthServiceConsumer consumer =
m_registry.getConsumer(consumerKey);
+ if (consumer != null) {
+ return Response.ok(OAuthServiceConsumerBean.copy(consumer,
uriInfo)).cacheControl(NO_CACHE_CONTROL)
+ .build();
+ }
+ else {
+ return
Response.status(HttpStatus.SC_NOT_FOUND).cacheControl(NO_CACHE_CONTROL).build();
+ }
+ }
+ catch (IllegalAccessException e) {
+ throw new WebApplicationException(e,
Response.Status.INTERNAL_SERVER_ERROR);
+ }
+ catch (InvocationTargetException e) {
+ throw new WebApplicationException(e,
Response.Status.INTERNAL_SERVER_ERROR);
+ }
+ catch (ConsumerRegistryStorageException e) {
+ throw new WebApplicationException(e,
Response.Status.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ /**
+ * REST interface: PUT /rest/oauth/consumers
+ * Adds a new consumer with the properties of the posted values in
application/xml or application/json format.
+ *
+ * @return The HTTP response object
+ */
+ @PUT
+ @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
+ public Response addConsumer(final OAuthServiceConsumerBean consumer) {
+ try {
+ m_registry.addConsumer(consumer);
+ return Response.ok().cacheControl(NO_CACHE_CONTROL).build();
+ }
+ catch (ConsumerAlreadyExistsException e) {
+ throw new WebApplicationException(Response.Status.NOT_MODIFIED);
+ }
+ catch (ConsumerRegistryStorageException e) {
+ throw new WebApplicationException(e,
Response.Status.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ /**
+ * REST interface: PUT /rest/oauth/consumers/{consumerKey}
+ * Updates an existing consumer with the properties of the posted values
in application/xml
+ * or application/json format.
+ *
+ * @param consumerKey
+ * The key of the consumer to update.
+ * @return The HTTP response object
+ */
+ @PUT
+ @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
+ @Path("{consumerKey}")
+ public Response updateConsumer(@PathParam("consumerKey") final String
consumerKey,
+ final OAuthServiceConsumerBean consumer) {
+ try {
+ m_registry.updateConsumer(consumer);
+ return Response.ok().cacheControl(NO_CACHE_CONTROL).build();
+ }
+ catch (ConsumerNotFoundException e) {
+ throw new WebApplicationException(Response.Status.NOT_FOUND);
+ }
+ catch (ConsumerRegistryStorageException e) {
+ throw new WebApplicationException(e,
Response.Status.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ /**
+ * REST interface: PUT /rest/oauth/consumers
+ * Adds a new consumer with the properties of the posted values in
application/xml or application/json format.
+ *
+ * @return The HTTP response object
+ */
+ @DELETE
+ @Path("{consumerKey}")
+ public Response deleteConsumer(@PathParam("consumerKey") final String
consumerKey) {
+ try {
+ m_registry.removeConsumer(m_registry.getConsumer(consumerKey));
+ return Response.ok().cacheControl(NO_CACHE_CONTROL).build();
+ }
+ catch (ConsumerNotFoundException e) {
+ throw new WebApplicationException(Response.Status.NOT_FOUND);
+ }
+ catch (ConsumerRegistryStorageException e) {
+ throw new WebApplicationException(e,
Response.Status.INTERNAL_SERVER_ERROR);
+ }
+ }
+}
Modified:
trunk/amdatu-auth/oauth-example/src/main/java/org/amdatu/example/oauth/osgi/Activator.java
==============================================================================
---
trunk/amdatu-auth/oauth-example/src/main/java/org/amdatu/example/oauth/osgi/Activator.java
(original)
+++
trunk/amdatu-auth/oauth-example/src/main/java/org/amdatu/example/oauth/osgi/Activator.java
Fri Jul 15 09:54:41 2011
@@ -18,7 +18,7 @@
import java.util.Dictionary;
import java.util.Hashtable;
-import org.amdatu.authentication.oauth.api.OAuthServiceConsumerRegistry;
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistry;
import org.amdatu.authentication.oauth.server.OAuthTokenProvider;
import org.amdatu.example.oauth.service.DummyInterface;
import org.amdatu.example.oauth.service.OAuthGadgetsRegistrationServiceImpl;
Modified:
trunk/amdatu-auth/oauth-example/src/main/java/org/amdatu/example/oauth/service/OAuthGadgetsRegistrationServiceImpl.java
==============================================================================
---
trunk/amdatu-auth/oauth-example/src/main/java/org/amdatu/example/oauth/service/OAuthGadgetsRegistrationServiceImpl.java
(original)
+++
trunk/amdatu-auth/oauth-example/src/main/java/org/amdatu/example/oauth/service/OAuthGadgetsRegistrationServiceImpl.java
Fri Jul 15 09:54:41 2011
@@ -22,7 +22,7 @@
import org.amdatu.authentication.oauth.api.ConsumerNotFoundException;
import org.amdatu.authentication.oauth.api.ConsumerRegistryStorageException;
import org.amdatu.authentication.oauth.api.OAuthServiceConsumer;
-import org.amdatu.authentication.oauth.api.OAuthServiceConsumerRegistry;
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistry;
import org.amdatu.example.oauth.osgi.Activator;
import org.amdatu.opensocial.gadgetmanagement.GadgetCategory;
import org.amdatu.opensocial.gadgetmanagement.GadgetDefinition;
Modified: trunk/amdatu-auth/oauth-server/pom.xml
==============================================================================
--- trunk/amdatu-auth/oauth-server/pom.xml (original)
+++ trunk/amdatu-auth/oauth-server/pom.xml Fri Jul 15 09:54:41 2011
@@ -38,6 +38,11 @@
<artifactId>org.amdatu.auth.tokenprovider</artifactId>
<type>bundle</type>
</dependency>
+ <dependency>
+ <groupId>org.amdatu.auth</groupId>
+ <artifactId>org.amdatu.auth.oauth.consumerregistry</artifactId>
+ <type>bundle</type>
+ </dependency>
<dependency>
<groupId>org.amdatu.core</groupId>
Modified:
trunk/amdatu-auth/oauth-server/src/main/java/org/amdatu/authentication/oauth/server/osgi/Activator.java
==============================================================================
---
trunk/amdatu-auth/oauth-server/src/main/java/org/amdatu/authentication/oauth/server/osgi/Activator.java
(original)
+++
trunk/amdatu-auth/oauth-server/src/main/java/org/amdatu/authentication/oauth/server/osgi/Activator.java
Fri Jul 15 09:54:41 2011
@@ -20,19 +20,17 @@
import javax.servlet.Servlet;
-import org.amdatu.authentication.oauth.api.OAuthServiceConsumerRegistry;
import org.amdatu.authentication.oauth.api.OAuthServiceProvider;
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistry;
import org.amdatu.authentication.oauth.server.OAuthAccessTokenServlet;
import org.amdatu.authentication.oauth.server.OAuthAuthorizeTokenServlet;
import org.amdatu.authentication.oauth.server.OAuthNonceStorageProvider;
import org.amdatu.authentication.oauth.server.OAuthRequestTokenServlet;
import org.amdatu.authentication.oauth.server.OAuthServerConfig;
-import org.amdatu.authentication.oauth.server.OAuthServiceConsumerRegistryREST;
import org.amdatu.authentication.oauth.server.OAuthTokenProvider;
import
org.amdatu.authentication.oauth.server.service.OAuthResourceProviderImpl;
import org.amdatu.authentication.oauth.server.service.OAuthServerConfiguration;
import
org.amdatu.authentication.oauth.server.service.OAuthServerConfigurationImpl;
-import
org.amdatu.authentication.oauth.server.service.OAuthServiceConsumerRegistryRESTImpl;
import org.amdatu.authentication.oauth.server.service.OAuthServiceProviderImpl;
import org.amdatu.authentication.oauth.server.service.OAuthTokenProviderImpl;
import
org.amdatu.authentication.oauth.server.servlet.OAuthAccessTokenServletImpl;
@@ -117,14 +115,6 @@
.add(createServiceDependency().setService(LogService.class).setRequired(true))
.add(createConfigurationDependency().setPid(OAuthServerConfig.PID)));
- // Create and register the oAuth service consumer registry REST service
- manager.add(
- createComponent()
-
.setInterface(OAuthServiceConsumerRegistryREST.class.getName(), null)
- .setImplementation(OAuthServiceConsumerRegistryRESTImpl.class)
-
.add(createServiceDependency().setService(LogService.class).setRequired(true))
-
.add(createServiceDependency().setService(OAuthServiceConsumerRegistry.class).setRequired(true)));
-
// Create and register the OAuth servlet components.
manager.add(createComponent(OAuthRequestTokenServlet.SERVLET_ALIAS,
OAuthRequestTokenServlet.class,
OAuthRequestTokenServletImpl.class));
Modified:
trunk/amdatu-auth/oauth-server/src/main/java/org/amdatu/authentication/oauth/server/service/OAuthTokenProviderImpl.java
==============================================================================
---
trunk/amdatu-auth/oauth-server/src/main/java/org/amdatu/authentication/oauth/server/service/OAuthTokenProviderImpl.java
(original)
+++
trunk/amdatu-auth/oauth-server/src/main/java/org/amdatu/authentication/oauth/server/service/OAuthTokenProviderImpl.java
Fri Jul 15 09:54:41 2011
@@ -29,8 +29,8 @@
import org.amdatu.authentication.oauth.api.ConsumerRegistryStorageException;
import org.amdatu.authentication.oauth.api.OAuthServiceConsumer;
-import org.amdatu.authentication.oauth.api.OAuthServiceConsumerRegistry;
import org.amdatu.authentication.oauth.api.OAuthServiceProvider;
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistry;
import org.amdatu.authentication.oauth.server.OAuthNonceStorageProvider;
import org.amdatu.authentication.oauth.server.OAuthTokenProvider;
import org.amdatu.authentication.tokenprovider.Token;
Modified: trunk/amdatu-auth/oauth-stores/consumer-store-fs/pom.xml
==============================================================================
--- trunk/amdatu-auth/oauth-stores/consumer-store-fs/pom.xml (original)
+++ trunk/amdatu-auth/oauth-stores/consumer-store-fs/pom.xml Fri Jul 15
09:54:41 2011
@@ -24,7 +24,7 @@
</parent>
<artifactId>org.amdatu.auth.oauth.store.consumer.fs</artifactId>
<packaging>bundle</packaging>
- <name>Amdatu Auth - oAuth File-based consumer registry store</name>
+ <name>Amdatu Auth - OAuth File-based consumer registry store</name>
<description>This bundle implements a persistent storage for oAuth service
consumers</description>
<dependencies>
@@ -34,9 +34,20 @@
<type>bundle</type>
</dependency>
<dependency>
+ <groupId>org.amdatu.auth</groupId>
+ <artifactId>org.amdatu.auth.oauth.consumerregistry</artifactId>
+ <type>bundle</type>
+ </dependency>
+ <dependency>
<groupId>org.amdatu.libraries</groupId>
<artifactId>org.amdatu.libraries.fsstorage</artifactId>
</dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
<build>
Modified:
trunk/amdatu-auth/oauth-stores/consumer-store-fs/src/main/java/org/amdatu/authentication/oauth/consumerregistry/fs/osgi/Activator.java
==============================================================================
---
trunk/amdatu-auth/oauth-stores/consumer-store-fs/src/main/java/org/amdatu/authentication/oauth/consumerregistry/fs/osgi/Activator.java
(original)
+++
trunk/amdatu-auth/oauth-stores/consumer-store-fs/src/main/java/org/amdatu/authentication/oauth/consumerregistry/fs/osgi/Activator.java
Fri Jul 15 09:54:41 2011
@@ -15,12 +15,12 @@
*/
package org.amdatu.authentication.oauth.consumerregistry.fs.osgi;
-import org.amdatu.authentication.oauth.api.OAuthServiceConsumerRegistry;
-import
org.amdatu.authentication.oauth.consumerregistry.fs.service.FSConsumerRegistryImpl;
-import org.apache.felix.dm.DependencyActivatorBase;
-import org.apache.felix.dm.DependencyManager;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.log.LogService;
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistry;
+import
org.amdatu.authentication.oauth.consumerregistry.fs.service.FSConsumerRegistryImpl;
+import org.apache.felix.dm.DependencyActivatorBase;
+import org.apache.felix.dm.DependencyManager;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.log.LogService;
/**
* This class represents the OSGi activator for the tenant service fs storage
provider.
@@ -29,7 +29,6 @@
@Override
public void init(final BundleContext context, final DependencyManager
manager) throws Exception {
-
manager.add(
createComponent()
.setImplementation(FSConsumerRegistryImpl.class)
Modified:
trunk/amdatu-auth/oauth-stores/consumer-store-fs/src/main/java/org/amdatu/authentication/oauth/consumerregistry/fs/service/FSConsumerRegistryImpl.java
==============================================================================
---
trunk/amdatu-auth/oauth-stores/consumer-store-fs/src/main/java/org/amdatu/authentication/oauth/consumerregistry/fs/service/FSConsumerRegistryImpl.java
(original)
+++
trunk/amdatu-auth/oauth-stores/consumer-store-fs/src/main/java/org/amdatu/authentication/oauth/consumerregistry/fs/service/FSConsumerRegistryImpl.java
Fri Jul 15 09:54:41 2011
@@ -15,21 +15,21 @@
*/
package org.amdatu.authentication.oauth.consumerregistry.fs.service;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Dictionary;
-import java.util.List;
-
-import org.amdatu.authentication.oauth.api.ConsumerAlreadyExistsException;
-import org.amdatu.authentication.oauth.api.ConsumerNotFoundException;
-import org.amdatu.authentication.oauth.api.ConsumerRegistryStorageException;
-import org.amdatu.authentication.oauth.api.OAuthServiceConsumer;
-import org.amdatu.authentication.oauth.api.OAuthServiceConsumerRegistry;
-import
org.amdatu.authentication.oauth.consumerregistry.fs.internal.FSConsumerEntity;
-import
org.amdatu.authentication.oauth.consumerregistry.fs.internal.FSConsumerStorage;
-import org.osgi.service.cm.ConfigurationException;
-import org.osgi.service.log.LogService;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.List;
+
+import org.amdatu.authentication.oauth.api.ConsumerAlreadyExistsException;
+import org.amdatu.authentication.oauth.api.ConsumerNotFoundException;
+import org.amdatu.authentication.oauth.api.ConsumerRegistryStorageException;
+import org.amdatu.authentication.oauth.api.OAuthServiceConsumer;
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistry;
+import
org.amdatu.authentication.oauth.consumerregistry.fs.internal.FSConsumerEntity;
+import
org.amdatu.authentication.oauth.consumerregistry.fs.internal.FSConsumerStorage;
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.log.LogService;
public class FSConsumerRegistryImpl implements OAuthServiceConsumerRegistry {
/**
Modified: trunk/amdatu-auth/pom.xml
==============================================================================
--- trunk/amdatu-auth/pom.xml (original)
+++ trunk/amdatu-auth/pom.xml Fri Jul 15 09:54:41 2011
@@ -113,7 +113,14 @@
</dependency>
<dependency>
<groupId>org.amdatu.auth</groupId>
- <artifactId>org.amdatu.auth.oauth.consumerregistry-fs</artifactId>
+ <artifactId>org.amdatu.auth.oauth.consumerregistry</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ <type>bundle</type>
+ </dependency>
+ <dependency>
+ <groupId>org.amdatu.auth</groupId>
+ <artifactId>org.amdatu.auth.oauth.store.consumer.fs</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
<type>bundle</type>
@@ -253,6 +260,7 @@
<module>login-service</module>
<module>oauth-api</module>
<module>oauth-client</module>
+ <module>oauth-consumerregistry</module>
<module>oauth-server</module>
<module>oauth-stores</module>
<module>release</module>
Modified: trunk/amdatu-auth/release/pom.xml
==============================================================================
--- trunk/amdatu-auth/release/pom.xml (original)
+++ trunk/amdatu-auth/release/pom.xml Fri Jul 15 09:54:41 2011
@@ -54,7 +54,7 @@
</dependency>
<dependency>
<groupId>org.amdatu.auth</groupId>
- <artifactId>org.amdatu.auth.oauth.consumerregistry-fs</artifactId>
+ <artifactId>org.amdatu.auth.oauth.store.consumer.fs</artifactId>
<scope>runtime</scope>
<type>bundle</type>
</dependency>
Modified: trunk/amdatu-auth/release/src/main/assembly/bin-component.xml
==============================================================================
--- trunk/amdatu-auth/release/src/main/assembly/bin-component.xml
(original)
+++ trunk/amdatu-auth/release/src/main/assembly/bin-component.xml Fri Jul
15 09:54:41 2011
@@ -27,7 +27,7 @@
<include>org.amdatu.auth:org.amdatu.auth.oauth.api</include>
<include>org.amdatu.auth:org.amdatu.auth.oauth.client</include>
<include>org.amdatu.auth:org.amdatu.auth.oauth.server</include>
-
<include>org.amdatu.auth:org.amdatu.auth.oauth.consumerregistry-fs</include>
+
<include>org.amdatu.auth:org.amdatu.auth.oauth.store.consumer.fs</include>
<include>org.amdatu.auth:org.amdatu.auth.tokenprovider</include>
<include>org.amdatu.auth:org.amdatu.auth.tokenstore.mem</include>
<include>org.amdatu.auth:org.amdatu.auth.useradmin.rest</include>
Modified:
trunk/amdatu-auth/test-integration/base/src/main/java/org/amdatu/auth/test/integration/base/AuthFixture.java
==============================================================================
---
trunk/amdatu-auth/test-integration/base/src/main/java/org/amdatu/auth/test/integration/base/AuthFixture.java
(original)
+++
trunk/amdatu-auth/test-integration/base/src/main/java/org/amdatu/auth/test/integration/base/AuthFixture.java
Fri Jul 15 09:54:41 2011
@@ -46,10 +46,11 @@
mavenBundle().groupId("org.amdatu.auth").artifactId("org.amdatu.auth.tokenprovider").versionAsInProject(),
mavenBundle().groupId("org.amdatu.auth").artifactId("org.amdatu.auth.tokenstore.mem").versionAsInProject(),
mavenBundle().groupId("org.amdatu.auth").artifactId("org.amdatu.auth.oauth.api").versionAsInProject(),
+
mavenBundle().groupId("org.amdatu.auth").artifactId("org.amdatu.auth.oauth.consumerregistry").versionAsInProject(),
mavenBundle().groupId("org.amdatu.auth").artifactId("org.amdatu.auth.oauth.client").versionAsInProject(),
mavenBundle().groupId("org.amdatu.auth").artifactId("org.amdatu.auth.oauth.server").versionAsInProject(),
mavenBundle().groupId("org.amdatu.auth").artifactId("org.amdatu.auth.oauth.store.nonce.mem").versionAsInProject(),
-
mavenBundle().groupId("org.amdatu.auth").artifactId("org.amdatu.auth.oauth.consumerregistry-fs").versionAsInProject(),
+
mavenBundle().groupId("org.amdatu.auth").artifactId("org.amdatu.auth.oauth.store.consumer.fs").versionAsInProject(),
mavenBundle().groupId("org.amdatu.auth").artifactId("org.amdatu.auth.login.service").versionAsInProject(),
mavenBundle().groupId("org.amdatu.auth").artifactId("org.amdatu.auth.useradmin.rest").versionAsInProject()
);
Modified: trunk/amdatu-auth/test-integration/tests/pom.xml
==============================================================================
--- trunk/amdatu-auth/test-integration/tests/pom.xml (original)
+++ trunk/amdatu-auth/test-integration/tests/pom.xml Fri Jul 15 09:54:41 2011
@@ -107,6 +107,13 @@
</dependency>
<dependency>
<groupId>org.amdatu.auth</groupId>
+ <artifactId>org.amdatu.auth.oauth.consumerregistry</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <type>bundle</type>
+ </dependency>
+ <dependency>
+ <groupId>org.amdatu.auth</groupId>
<artifactId>org.amdatu.auth.oauth.server</artifactId>
<version>${project.version}</version>
<scope>test</scope>
@@ -114,7 +121,7 @@
</dependency>
<dependency>
<groupId>org.amdatu.auth</groupId>
- <artifactId>org.amdatu.auth.oauth.consumerregistry-fs</artifactId>
+ <artifactId>org.amdatu.auth.oauth.store.consumer.fs</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<type>bundle</type>
@@ -204,12 +211,17 @@
</dependency>
<dependency>
<groupId>org.amdatu.auth</groupId>
+ <artifactId>org.amdatu.auth.oauth.consumerregistry</artifactId>
+ <type>bundle</type>
+ </dependency>
+ <dependency>
+ <groupId>org.amdatu.auth</groupId>
<artifactId>org.amdatu.auth.oauth.server</artifactId>
<type>bundle</type>
</dependency>
<dependency>
<groupId>org.amdatu.auth</groupId>
- <artifactId>org.amdatu.auth.oauth.consumerregistry-fs</artifactId>
+ <artifactId>org.amdatu.auth.oauth.store.consumer.fs</artifactId>
<type>bundle</type>
</dependency>
<dependency>
Modified:
trunk/amdatu-auth/test-integration/tests/src/test/java/org/amdatu/auth/test/integration/tests/AuthTest.java
==============================================================================
---
trunk/amdatu-auth/test-integration/tests/src/test/java/org/amdatu/auth/test/integration/tests/AuthTest.java
(original)
+++
trunk/amdatu-auth/test-integration/tests/src/test/java/org/amdatu/auth/test/integration/tests/AuthTest.java
Fri Jul 15 09:54:41 2011
@@ -34,8 +34,8 @@
import org.amdatu.auth.test.integration.tests.util.AuthTestBase;
import org.amdatu.auth.test.integration.tests.util.AuthUtils;
import org.amdatu.auth.test.integration.tests.util.OAuthProtectedTestServlet;
-import org.amdatu.authentication.oauth.api.OAuthServiceConsumerRegistry;
import org.amdatu.authentication.oauth.api.OAuthServiceProvider;
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistry;
import org.amdatu.authentication.oauth.server.OAuthAccessTokenServlet;
import org.amdatu.authentication.oauth.server.OAuthAuthorizeTokenServlet;
import org.amdatu.authentication.oauth.server.OAuthRequestTokenServlet;
Modified:
trunk/amdatu-auth/test-integration/tests/src/test/java/org/amdatu/auth/test/integration/tests/util/AuthTestBase.java
==============================================================================
---
trunk/amdatu-auth/test-integration/tests/src/test/java/org/amdatu/auth/test/integration/tests/util/AuthTestBase.java
(original)
+++
trunk/amdatu-auth/test-integration/tests/src/test/java/org/amdatu/auth/test/integration/tests/util/AuthTestBase.java
Fri Jul 15 09:54:41 2011
@@ -26,8 +26,8 @@
import org.amdatu.auth.test.integration.base.AuthFixture;
import org.amdatu.auth.test.integration.tests.AuthTest;
-import org.amdatu.authentication.oauth.api.OAuthServiceConsumerRegistry;
import org.amdatu.authentication.oauth.api.OAuthServiceProvider;
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistry;
import org.amdatu.core.tenant.TenantManagementService;
import org.apache.commons.httpclient.HeaderElement;
import org.apache.commons.httpclient.HttpClient;
Modified:
trunk/amdatu-auth/test-integration/tests/src/test/java/org/amdatu/auth/test/integration/tests/util/OAuthProtectedTestServlet.java
==============================================================================
---
trunk/amdatu-auth/test-integration/tests/src/test/java/org/amdatu/auth/test/integration/tests/util/OAuthProtectedTestServlet.java
(original)
+++
trunk/amdatu-auth/test-integration/tests/src/test/java/org/amdatu/auth/test/integration/tests/util/OAuthProtectedTestServlet.java
Fri Jul 15 09:54:41 2011
@@ -37,7 +37,7 @@
import net.oauth.OAuthMessage;
import net.oauth.server.OAuthServlet;
-import org.amdatu.authentication.oauth.api.OAuthServiceConsumerRegistry;
+import
org.amdatu.authentication.oauth.consumerregistry.OAuthServiceConsumerRegistry;
import org.amdatu.authentication.oauth.server.OAuthTokenProvider;
import org.amdatu.authentication.tokenprovider.Token;
import org.osgi.service.log.LogService;
_______________________________________________
Amdatu-commits mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-commits