Add OpenID test documentation

* Write a paragraph that informs contributors about the openID test
accounts that are available and provide instructions on how to
enable them in development (#1315) in CONTRIBUTING.md

* Add missing environment variable for openID logins via openSUSE
(OSEM_SUSE_KEY, OSEM_SUSE_SECRET) in dotenv.example
This commit is contained in:
AEtherC0r3 2017-03-13 18:16:07 +02:00
parent d90d2344d6
commit dcd57934fb
3 changed files with 18 additions and 0 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

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=''