File: oauthtwitter.md

package info (click to toggle)
simplesamlphp 1.19.7-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 42,920 kB
  • sloc: php: 202,044; javascript: 14,867; xml: 2,700; sh: 225; perl: 82; makefile: 70; python: 5
file content (35 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download | duplicates (5)
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
Using the Twitter authentication source with SimpleSAMLphp
==========================================================

Remember to configure `authsources.php`, with both Consumer key and secret.

To get an API key and a secret, register the application at:

 * <http://twitter.com/oauth_clients>

Set the callback URL to be:

 * `http://sp.example.org/simplesaml/module.php/authtwitter/linkback.php`

Replace `sp.example.org` with your hostname.

## Testing authentication

On the SimpleSAMLphp frontpage, go to the *Authentication* tab, and use the link:

  * *Test configured authentication sources*

Then choose the *twitter* authentication source.

Expected behaviour would then be that you are sent to twitter, and asked to login:

![](http://clippings.erlang.no/ZZ2EE26BF6.jpg)

The first time a user uses your application to login, he/she is asked for consent:

![](http://clippings.erlang.no/ZZ6B18B5D9.jpg)

You will then be authenticated in SimpleSAMLphp and see an attribute set similar to this:

![](http://clippings.erlang.no/ZZ74A6835E.jpg)