My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

README -- MySpaceID
-------------------

This package is the Java SDK for MySpaceID, which lets your web servers
communicate with MySpace servers to request user data.


How to Run the Samples
----------------------

Simply point your app server to the sample directory, start your app server,
and point your browser to the index.jsp file in the sample directory.

The samples have been built to run out of the box, but you must make sure to
run them using the correct path. This is described when you first access the
index.jsp file in the samples directory.

The samples use a consumer key/secret pair for demo purposes. For your own
development, you must obtain your own. If you use OpenID, you must also set
up your realm. If you haven't already, visit the MySpace Developer site
(http://developer.myspace.com) to set things up. Please see
http://developerwiki.myspace.com/index.php?title=How_to_Set_Up_a_New_Application_for_OpenID
for a walkthrough.

IMPORTANT: The domain on which you run your server MUST be entered as a realm
on your MySpace app configuration page. In order for the samples to work
you MUST INCLUDE A SLASH AT THE END OF YOUR DOMAIN, e.g.
http://your-domain:3000/, when you enter it as a realm.


Overview of the Samples
-----------------------

OAuth
-----
This sample demonstrates an OAuth Consumer application by implementing
the OAuth delegated access flow ("3 legged oauth"). Once the User authorizes
the Consumer's request, it fetches the user's profile and friend information
using the library.

Hybrid
------
This sample demonstrates an OpenID "Combined Consumer" by implementing the
openid/oauth "hybrid" spec as specified at:
http://step2.googlecode.com/svn/spec/openid_oauth_extension/latest/openid_oauth_extension.html

This sample also demonstrates interaction with MySpace using the MySpace
library to fetch the user's profile and friends data.

NOTE: Please note that in the samples above we store the access token in the
session. But, in a real application you would probably need to store it an
the user database so that you can call the MySpace API methods in the future
using the stored access token.


Types of Applications
---------------------

This SDK may be used in the following situations:

1. External Website: You have a website and you want your users to be able
to log on using their MySpace accounts. After a user logs on, this SDK
will allow you to fetch his/her data such as name, friends, etc., from
MySpace. See below for options on implementing authentication.

2. On-site App: You have a MySpace on-site application and you need to write
server-side code that accesses user data. This SDK allows you to access
user data without the need for authentication.

In the first case, you will need to authenticate the user. In the second case,
authentication is not necessary, and you will be able to fetch information
about any user who has installed your application.


Documentation
-------------

The best way to get something working is to customize the existing samples.
But if you need additional documentation, please refer to:

* Javadocs documentation for this SDK's API is in the doc directory
* MySpaceID Wiki - http://developerwiki.myspace.com/index.php?title=Category:MySpaceID
* MySpaceID Forum Discussions - http://developer.myspace.com/Community/forums/60.aspx
* MySpace Developer Site - http://developer.myspace.com


Package Contents
----------------

build.xml - Ant build configuration

LICENSE - MIT license. The openid4java portions remain under the Apache
license:
- everything under src/org
- sample/hybrid/formredirection.jsp.

doc/ - Javadoc for this SDK's API

lib/ - Jar libraries needed

sample/ - Sample apps demonstrating OAuth and OpenID-OAuth hybrid.

src/ - Source code. The sample consumer servlet
org/openid4java/samples/consumer-servlet/ConsumerServlet.java has
been adapated and is used by the OpenID-OAuth hybrid sample.

Note: this package is built on top of the openid4java package with minor
modifications. Its source code only is included here, but if you need the
entire package, it is available at http://code.google.com/p/openid4java/.

Change log

r34 by kiamchoo on Mar 17, 2009   Diff
[No log message]
Go to: 
Project members, sign in to write a code review

Older revisions

r32 by kiamchoo on Mar 16, 2009   Diff
[No log message]
r30 by kiamchoo on Mar 16, 2009   Diff
[No log message]
r20 by kiamchoo on Mar 13, 2009   Diff
[No log message]
All revisions of this file

File info

Size: 4372 bytes, 111 lines
Powered by Google Project Hosting