Skip to main content

App de integração com o login do backstage

Project description

===============================
Backstage OAuth2
===============================

Introduction
============

- Inclua no seu requirements
- Inclua o código no seu urls.py
```python
from backstage_oauth2.views import BackstageOAuthRedirect
# admin.site.login deve vir depois do admin.autodiscover()
admin.site.login = BackstageOAuthRedirect.as_view(provider='backstage')
urlpatterns += patterns(
'',
url(r'^accounts/', include('backstage_oauth2.urls')),
)
```

- Adicione no INSTALLED_APPS:
```
'allaccess',
'backstage_oauth2'
```

- No settings, adicionar no AUTHENTICATION_BACKENDS:
```python
AUTHENTICATION_BACKENDS = [
'allaccess.backends.AuthorizedServiceBackend',
'django.contrib.auth.backends.ModelBackend',
]
```

- Crie um arquivo json para o provider backstage. Ex de dev:
```json
[
{
"pk": 1,
"model": "allaccess.provider",
"fields": {
"name": "backstage",
"authorization_url": "https://accounts.backstage.dev.globoi.com/authorize",
"secret": "SEU SECRET",
"access_token_url": "https://accounts.backstage.dev.globoi.com/token",
"key": "SEU KEY",
"request_token_url": "",
"profile_url": "https://accounts.backstage.dev.globoi.com/user"
}
}
]
```

- Carregue o json
```
./manage.py loaddata caminho/para/seu/arquivo.json
```

* Free software: BSD license

Features
--------

* TODO
- Fazer integração com a barra do backstage





History
-------
0.1.1 (2017-10-18)
---------------------

* Procura usuário por email e username ao invés de ser somente pelo username.


0.1.1 (2017-10-11)
---------------------

* First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

backstage-oauth2-0.1.3.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file backstage-oauth2-0.1.3.tar.gz.

File metadata

File hashes

Hashes for backstage-oauth2-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c9e837a05d2dcb3932105adfde320961291af9da89e24ccc0aab0bb6dc10b9bf
MD5 41b6ef324f886070a4f9b84d83299549
BLAKE2b-256 0735306ba971ca041548bfb0fdfffdd6b6c744d09097ea4f3f12dd00adf77bfc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page