Add installation and configuration documentation

master
Lars Vierbergen 7 years ago
parent 095c8eea71
commit 089d8fa487
  1. 57
      readme.md

@ -0,0 +1,57 @@
# Authserver: OAuth account plugin
This [Authserver](https://github.com/vierbergenlars/authserver) plugin that provides external authentication with OAuth services.
All services supported by the [HWIOAuthBundle](https://github.com/hwi/HWIOAuthBundle/blob/master/Resources/doc/2-configuring_resource_owners.md) can be used,
including custom providers that are not available in the HWIOAuthBundle.
## Installation
`./plugin.sh install vierbergenlars/authserver-oauth-account-bundle`
For more details, see the [Authserver plugin documentation](https://github.com/vierbergenlars/authserver/blob/master/documentation/plugins.md).
## Configuration
You can configure the bundle in the authserver `app/config/parameters.yml` file.
Add a new array key under `oauth.resource_owners` for each OAuth service that you want to support.
The name of a service is arbitrary and is not used to derive the type of service.
For each service, the `config` and the `service_name` properties are required.
```
oauth:
resource_owners:
# Prototype
name:
config: [] # Required, HWIOauthBundle resource owner configuration
service_name: ~ # Required
icon: null
trust_email_verification: false
login_button:
label: null
style: default
icon: null
connect_button:
label: null
style: default
icon: null
```
`config` is passed straight through to HWIOAuthBundle, and is used there as resource owner configuration.
Constraints on this configuration are handled and processed by the HWIOAuthBundle, so errors in this configuration result
in a message with the wrong error path specified.
`service_name` is the friendly name of the service that will be shown to users in the interface.
`icon` is the [FontAwesome](http://fontawesome.io/icons/) icon name to use for the service. If left blank, no icon will be shown.
`trust_email_verification` determines whether email addresses provided by the OAuth provider will be automatically marked as verified when they are used during registration. If true, no verification email will be sent, and the email address will be marked als verified on registration. If false, a verification email will be sent to the user before the email address is considered verified.
`login_button` and `connect_button` can be used to further tweak the looks of the login button and the connect button on the user profile.
`label` specifies the text shown on the button. (Defaults to `$service_name Login` and `Connect with $service_name`)
`style` specifies the bootstrap style to use for the button (class name `btn-$style` is used). Without custom css, its value must be one of `default`, `primary`, `success`, `info`, `warning`, `danger`.
`icon` is the FontAwesome icon name to use for the service. It defaults to the icon provided on the service name.