Skip to content

Commit 02a28f2

Browse files
committed
Refactor webscripts used to get and set OAuth tokens
- Move into org.sharextras package - Add web scripts Spring config and descriptors from Chatter project
1 parent 27c89c6 commit 02a28f2

File tree

5 files changed

+35
-2
lines changed

5 files changed

+35
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.alfresco.integrations.salesforce.chatter;
1+
package org.sharextras.oauth.repo.webscripts;
22

33
import java.io.IOException;
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.alfresco.integrations.salesforce.chatter;
1+
package org.sharextras.oauth.repo.webscripts;
22

33
import java.io.IOException;
44
import java.util.Date;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
3+
<beans>
4+
5+
<bean id="webscript.org.sharextras.slingshot.oauth.oauth-token.get"
6+
class="org.sharextras.oauth.repo.webscripts.GetOAuthToken" parent="webscript">
7+
<property name="oauth2CredentialsStoreService">
8+
<ref bean="oauth2CredentialsStoreService" />
9+
</property>
10+
</bean>
11+
12+
<bean id="webscript.org.sharextras.slingshot.oauth.oauth-token.post"
13+
class="org.sharextras.oauth.repo.webscripts.SaveOAuthToken" parent="webscript">
14+
<property name="oauth2CredentialsStoreService">
15+
<ref bean="oauth2CredentialsStoreService" />
16+
</property>
17+
</bean>
18+
19+
</beans>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<webscript>
2+
<shortname>OAuth2-get-token</shortname>
3+
<description>Script to fetch an OAuth 2.0 token</description>
4+
<url>/extras/oauth2/token/{name}</url>
5+
<authentication>user</authentication>
6+
<format default="json">any</format>
7+
</webscript>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<webscript>
2+
<shortname>OAuth2-save-token</shortname>
3+
<description>Script to save an OAuth 2.0 token</description>
4+
<url>/extras/oauth2/token/{name}</url>
5+
<authentication>user</authentication>
6+
<format default="json">any</format>
7+
</webscript>

0 commit comments

Comments
 (0)