Merge pull request #1366 from AEtherC0r3/openid_documentation

Improve Openid documentation
This commit is contained in:
Stella Rouzi 2017-04-04 15:52:58 +03:00 committed by GitHub
commit ab0719096a
3 changed files with 19 additions and 1 deletions

View file

@ -169,6 +169,18 @@ config.ichain_force_test_username = "testuser"
# set email of 'testuser'
config.ichain_force_test_attributes = {:email => "testuser@example.com"}
```
### Using OpenID in developement
OSEM supports [OpenID](https://openid.net/) logins via [OmniAuth](https://github.com/omniauth/omniauth) and related provider specific gems. OmniAuth provides the ablity to define per-provider mock accounts for testing. The supported providers are Facebook, Google, openSUSE and GitHub. If you want to use the OSEM provided mock accounts you need to set the appropriate `OSEM_PROVIDER_KEY` and `OSEM_PROVIDER_SECRET` environment variables to a non empty string in the `.env` file.
e.g.
```
OSEM_GITHUB_KEY='sample'
OSEM_GITHUB_SECRET='sample'
```
If you don't already have a `.env` file you can use the `dotenv.example` as a template.
## Labels for issues and PRs
...and what they mean!

View file

@ -43,6 +43,8 @@ There are a couple of environment variables you can set to configure OSEM. Check
| OSEM_FACEBOOK_SECRET | *string* | OMNIAUTH Developer Secret for Facebook
| OSEM_GITHUB_KEY | *string* | OMNIAUTH Developer Key for GitHub
| OSEM_GITHUB_SECRET | *string* | OMNIAUTH Developer Secret for GitHub
| OSEM_SUSE_KEY | *string* | OMNIAUTH Developer Key for openSUSE
| OSEM_SUSE_SECRET | *string* | OMNIAUTH Developer Secret for openSUSE
| OSEM_SMTP_ADDRESS | smtp.opensuse.org | The smtp server to use
| OSEM_SMTP_PORT | *int* | The port on the smtp server
| OSEM_SMTP_USERNAME | *string* | The user for the smtp server
@ -69,7 +71,7 @@ $ bundle exec rake logo:reprocess
```
### openID
In order to use [openID](http://openid.net/) logins for your OSEM installation you need to register your application with the providers ([Google](https://code.google.com/apis/console#:access), [GitHub](https://github.com/settings/applications/new) or [Facebook](https://developers.facebook.com/)) and enter their API keys, changing the existing sample values, in `config/secrets.yml` file, or in your environment variables found in *.env.production* file.
In order to use [openID](http://openid.net/) logins for your OSEM installation you need to register your application with the providers ([Google](https://code.google.com/apis/console#:access), [GitHub](https://github.com/settings/applications/new) or [Facebook](https://developers.facebook.com/)) and enter their API keys in the environment variables found in your *.env* file(s).
## Recurring Jobs
Open a separate terminal and go into the directory where the rails app is present, and type the following to start the delayed_jobs worker for sending email notifications.

View file

@ -37,6 +37,10 @@ OSEM_FACEBOOK_SECRET=''
OSEM_GITHUB_KEY=''
OSEM_GITHUB_SECRET=''
# OMNIAUTH Developer KEY/Secret for SUSE/openSUSE
OSEM_SUSE_KEY=''
OSEM_SUSE_SECRET=''
# STRIPE Publishable/Secret keys
# test keys for development mode, live for production mode
STRIPE_PUBLISHABLE_KEY=''