grim/prosody_mod_auth_jetbrains_hub

Parents 9225c55c5d30
Children 951359d77b5f
Clean up a bunch of the docs and add docs for the groups option
  • +22 -16
    README.md
  • --- a/README.md Thu Oct 24 05:11:15 2019 -0500
    +++ b/README.md Sun Nov 03 03:44:23 2019 -0600
    @@ -11,7 +11,8 @@
    # Details
    When a user attempts to authenticate to Prosody, this module will ask Hub if
    -the user is allowed and if their credentials are correct.
    +their credentials are correct and optionally if they are allowed to access
    +Prosody.
    # Prerequisites
    @@ -19,7 +20,7 @@
    running. Documentation for installation can be found
    [here](https://www.jetbrains.com/help/hub/installation-and-upgrade.html).
    -Once you Hub installation is up and running we need to create a new service
    +Once your Hub installation is up and running we need to create a new service
    in Hub that will allows us to query it. To start you'll need to access the
    services page of your Hub instance. If you Hub is running on `hub.example.com`
    you can find it at `https://hub.example.com/hub/services`.
    @@ -29,11 +30,11 @@
    make it so people can access it from the Hub interface. But that's really only
    necessary if you have some HTTP setup in your Prosody install.
    -Once you've create the service all we need to talk to it is the `ID` of the
    +Once you've created the service all we need to talk to it is the `ID` of the
    client and it's secret. When the service is created it has a random secret
    -that we don't know, so go ahead and click the `Change...` button next to
    +that isn't shown, so go ahead and click the `Change...` button next to
    `Secret`. Please note, that this is the only time that Hub will show the
    -secret to you, so please write it down.
    +secret, so be sure to store it.
    Now that the service is configured in Hub we can go ahead and configure the
    Prosody module to talk to it.
    @@ -43,23 +44,28 @@
    ``` lua
    VirtualHost "example.com"
    authentication = "jetbrains_hub"
    -hub_url = "https://hub.example.com/hub"
    -hub_scopes = "0-0-0-0-0"
    -hub_client_id = "Client ID"
    -hub_client_secret = "Client Secret Key"
    +jetbrains_hub_url = "https://hub.example.com/hub"
    +jetbrains_hub_scopes = "0-0-0-0-0"
    +jetbrains_hub_client_id = "Client ID"
    +jetbrains_hub_client_secret = "Client Secret Key"
    +jetbrains_hub_groups = {}
    ```
    -`hub_url` is the url to the root of your Hub installation. In the example
    -above hub is running on HTTPS at `hub.example.com` with it's normal path of
    -`/hub`.
    +`jetbrains_hub_url` is the url to the root of your Hub installation. In the
    +example above, hub is running on HTTPS at `hub.example.com` with it's normal
    +path of `/hub`.
    -`hub_scopes` is the ID of the Hub service itself. In my experience this is
    -always `0-0-0-0-0` but you can double check by going to
    +`jetbrains_hub_scopes` is the ID of the Hub service itself. In my experience
    +this is always `0-0-0-0-0` but you can double check by going to
    `https://hub.example.com/hub/services/jetbrains-hub-service`. You want the
    value from the `ID` field.
    -`hub_client_id` and `hub_client_secret` are the values for the service ID and
    -secrete that were created in the prerequisites section.
    +`jetbrains_hub_client_id` and `hub_client_secret` are the values for the
    +service ID and secret that were created in the prerequisites section.
    +
    +`jetbrains_hub_groups` is a table of hub group names that are allowed to access
    +the server. If no groups are given any user that exists in hub will be allowed
    +to access Prosody.
    # Compatibility