Mercurial > prosody-modules
annotate mod_auth_oauthbearer/README.markdown @ 4260:c539334dd01a
mod_http_oauth2: Rescope oauth client config into users' storage
This produces client_id of the form owner@host/random and prevents
clients from being deleted by registering an account with the same name
and then deleting the account, as well as having the client
automatically be deleted when the owner account is removed.
On one hand, this leaks the bare JID of the creator to users. On the
other hand, it makes it obvious who made the oauth application.
This module is experimental and only for developers, so this can be
changed if a better method comes up.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 21 Nov 2020 23:55:10 +0100 |
parents | 1a1affd22f74 |
children |
rev | line source |
---|---|
3114
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
1 --- |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
2 labels: |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
3 - 'Type-Auth' |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
4 summary: OAuth authentication |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
5 ... |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
6 |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
7 Introduction |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
8 ============ |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
9 |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
10 This is an authentication module for the SASL OAUTHBEARER mechanism, as provided by `mod_sasl_oauthbearer`. |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
11 |
3116
1a1affd22f74
mod_auth_oauthbearer: expand intro to mention when/how you'd use this
JC Brand <jc@opkode.com>
parents:
3114
diff
changeset
|
12 You can use this to log in via OAuth, for example if you want your user's to log in with Github, Twitter, Reddit etc. |
1a1affd22f74
mod_auth_oauthbearer: expand intro to mention when/how you'd use this
JC Brand <jc@opkode.com>
parents:
3114
diff
changeset
|
13 |
1a1affd22f74
mod_auth_oauthbearer: expand intro to mention when/how you'd use this
JC Brand <jc@opkode.com>
parents:
3114
diff
changeset
|
14 The XMPP client needs get an OAuth token from the provider (e.g. Github) and send that to Prosody. |
1a1affd22f74
mod_auth_oauthbearer: expand intro to mention when/how you'd use this
JC Brand <jc@opkode.com>
parents:
3114
diff
changeset
|
15 This module will then verify that token by calling the `oauth_url` you've configured. |
1a1affd22f74
mod_auth_oauthbearer: expand intro to mention when/how you'd use this
JC Brand <jc@opkode.com>
parents:
3114
diff
changeset
|
16 |
3114
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
17 Configuration |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
18 ============= |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
19 |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
20 Per VirtualHost, you'll need to supply your OAuth client Id, secret and the URL which |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
21 Prosody must call in order to verify the OAuth token it receives from the XMPP client. |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
22 |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
23 For example, for Github: |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
24 |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
25 oauth_client_id = "13f8e9cc8928b3409822" |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
26 oauth_client_secret = "983161fd3ah608ea7ef35382668aad1927463978" |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
27 oauth_url = "https://api.github.com/applications/{{oauth_client_id}}/tokens/{{password}}"; |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
28 |
73ada978dabc
mod_sasl_oauthbearer and mod_auth_oauthbearer
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
29 authentication = "oauthbearer" |