Skip to content

Commit c96f179

Browse files
committed
Rename begin
1 parent 07884aa commit c96f179

33 files changed

+74
-85
lines changed

AUTHORS.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Development Lead
77

88
* Denis Bobrov <tech@bearle.ru>
99

10-
Contributors
10+
Special Thanks
1111
------------
1212

13-
* Alexander Tereshkin <atereshkin@y-node.com>
13+
* Nathan James <scatter.eos@gmail.com>

CONTRIBUTING.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Types of Contributions
1313
Report Bugs
1414
~~~~~~~~~~~
1515

16-
Report bugs at https://github.com/Bearle/django-web3-auth/issues.
16+
Report bugs at https://github.com/Bearle/django-scatter-auth/issues.
1717

1818
If you are reporting a bug, please include:
1919

@@ -36,14 +36,14 @@ is open to whoever wants to implement it.
3636
Write Documentation
3737
~~~~~~~~~~~~~~~~~~~
3838

39-
Django-Web3-Auth could always use more documentation, whether as part of the
40-
official Django-Web3-Auth docs, in docstrings, or even on the web in blog posts,
39+
Django-scatter-auth could always use more documentation, whether as part of the
40+
official Django-scatter-auth docs, in docstrings, or even on the web in blog posts,
4141
articles, and such.
4242

4343
Submit Feedback
4444
~~~~~~~~~~~~~~~
4545

46-
The best way to send feedback is to file an issue at https://github.com/Bearle/django-web3-auth/issues.
46+
The best way to send feedback is to file an issue at https://github.com/Bearle/django-scatter-auth/issues.
4747

4848
If you are proposing a feature:
4949

@@ -55,17 +55,17 @@ If you are proposing a feature:
5555
Get Started!
5656
------------
5757

58-
Ready to contribute? Here's how to set up `django-web3-auth` for local development.
58+
Ready to contribute? Here's how to set up `django-scatter-auth` for local development.
5959

60-
1. Fork the `django-web3-auth` repo on GitHub.
60+
1. Fork the `django-scatter-auth` repo on GitHub.
6161
2. Clone your fork locally::
6262

63-
$ git clone git@github.com:your_name_here/django-web3-auth.git
63+
$ git clone git@github.com:your_name_here/django-scatter-auth.git
6464

6565
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
6666

67-
$ mkvirtualenv django-web3-auth
68-
$ cd django-web3-auth/
67+
$ mkvirtualenv django-scatter-auth
68+
$ cd django-scatter-auth/
6969
$ python setup.py develop
7070

7171
4. Create a branch for local development::
@@ -101,7 +101,7 @@ Before you submit a pull request, check that it meets these guidelines:
101101
your new functionality into a function with a docstring, and add the
102102
feature to the list in README.rst.
103103
3. The pull request should work for Python 2.6, 2.7, and 3.3, and for PyPy. Check
104-
https://travis-ci.org/Bearle/django-web3-auth/pull_requests
104+
https://travis-ci.org/Bearle/django-scatter-auth/pull_requests
105105
and make sure that the tests pass for all supported Python versions.
106106

107107
Tips

HISTORY.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
History
44
-------
55

6-
0.1.0 (2018-06-29)
6+
0.1.0 (2018-08-06)
77
++++++++++++++++++
88

99
* First release on PyPi

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ include CONTRIBUTING.rst
33
include HISTORY.rst
44
include LICENSE
55
include README.rst
6-
recursive-include web3auth *.html *.png *.gif *js *.css *jpg *jpeg *svg *py
6+
recursive-include scatterauth *.html *.png *.gif *js *.css *jpg *jpeg *svg *py

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ clean-pyc: ## remove Python file artifacts
2828
find . -name '*~' -exec rm -f {} +
2929

3030
lint: ## check style with flake8
31-
flake8 web3auth tests
31+
flake8 scatterauth tests
3232

3333
test: ## run tests quickly with the default Python
3434
python runtests.py tests
@@ -37,15 +37,15 @@ test-all: ## run tests on every Python version with tox
3737
tox
3838

3939
coverage: ## check code coverage quickly with the default Python
40-
coverage run --source web3auth runtests.py tests
40+
coverage run --source scatterauth runtests.py tests
4141
coverage report -m
4242
coverage html
4343
open htmlcov/index.html
4444

4545
docs: ## generate Sphinx HTML documentation, including API docs
4646
rm -f docs/django-web3-auth.rst
4747
rm -f docs/modules.rst
48-
sphinx-apidoc -o docs/ web3auth
48+
sphinx-apidoc -o docs/ scatterauth
4949
$(MAKE) -C docs clean
5050
$(MAKE) -C docs html
5151
$(BROWSER) docs/_build/html/index.html

README.rst

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
=============================
2-
Django-Web3-Auth
2+
django-scatter-auth
33
=============================
44

5-
.. image:: https://badge.fury.io/py/django-web3-auth.svg
6-
:target: https://badge.fury.io/py/django-web3-auth
5+
.. image:: https://badge.fury.io/py/django-scatter-auth.svg
6+
:target: https://badge.fury.io/py/django-scatter-auth
77

8-
.. image:: https://travis-ci.org/Bearle/django-web3-auth.svg?branch=master
9-
:target: https://travis-ci.org/Bearle/django-web3-auth
8+
.. image:: https://travis-ci.org/Bearle/django-scatter-auth.svg?branch=master
9+
:target: https://travis-ci.org/Bearle/django-scatter-auth
1010

11-
.. image:: https://codecov.io/gh/Bearle/django-web3-auth/branch/master/graph/badge.svg
12-
:target: https://codecov.io/gh/Bearle/django-web3-auth
11+
.. image:: https://codecov.io/gh/Bearle/django-scatter-auth/branch/master/graph/badge.svg
12+
:target: https://codecov.io/gh/Bearle/django-scatter-auth
1313

14-
django-web3-auth is a pluggable Django app that enables login/signup via an Ethereum wallet (a la CryptoKitties). The user authenticates themselves by digitally signing the session key with their wallet's private key.
14+
django-scatter-auth is a pluggable Django app that enables login/signup via an Ethereum wallet (a la CryptoKitties). The user authenticates themselves by digitally signing the session key with their wallet's private key.
1515

16-
.. image:: https://github.com/Bearle/django-web3-auth/blob/master/docs/_static/web3_auth_test.gif?raw=true
16+
.. image:: https://github.com/Bearle/django-scatter-auth/blob/master/docs/_static/web3_auth_test.gif?raw=true
1717

1818
Documentation
1919
-------------
2020

21-
The full documentation is at https://django-web3-auth.readthedocs.io.
21+
The full documentation is at https://django-scatter-auth.readthedocs.io.
2222

2323
Example project
2424
---------------
2525

26-
https://github.com/Bearle/django-web3-auth/tree/master/example
26+
https://github.com/Bearle/django-scatter-auth/tree/master/example
2727

2828
You can check out our example project by cloning the repo and heading into example/ directory.
2929
There is a README file for you to check, also.
@@ -43,26 +43,26 @@ Features
4343

4444
Quickstart
4545
----------
46-
Install Django-Web3-Auth with pip::
46+
Install django-scatter-auth with pip::
4747

48-
pip install django-web3-auth
48+
pip install django-scatter-auth
4949

5050
Add it to your `INSTALLED_APPS`:
5151

5252
.. code-block:: python
5353
5454
INSTALLED_APPS = (
5555
...
56-
'web3auth.apps.Web3AuthConfig',
56+
'scatterauth.apps.scatterauthConfig',
5757
...
5858
)
59-
Set `'web3auth.backend.Web3Backend'` as your authentication backend:
59+
Set `'scatterauth.backend.Web3Backend'` as your authentication backend:
6060

6161
.. code-block:: python
6262
6363
AUTHENTICATION_BACKENDS = [
6464
'django.contrib.auth.backends.ModelBackend',
65-
'web3auth.backend.Web3Backend'
65+
'scatterauth.backend.Web3Backend'
6666
]
6767
Set your User model's field to use as ETH address provider:
6868

@@ -77,16 +77,16 @@ And if you have some other fields you want to be in the SignupForm, add them too
7777
SCATTERAUTH_USER_SIGNUP_FIELDS = ['email',]
7878
7979
80-
Add Django-Web3-Auth's URL patterns:
80+
Add django-scatter-auth's URL patterns:
8181

8282
.. code-block:: python
8383
84-
from web3auth import urls as web3auth_urls
84+
from scatterauth import urls as scatterauth_urls
8585
8686
8787
urlpatterns = [
8888
...
89-
url(r'^', include(web3auth_urls)),
89+
url(r'^', include(scatterauth_urls)),
9090
...
9191
]
9292
@@ -95,7 +95,7 @@ Add some javascript to handle login:
9595

9696
.. code-block:: html
9797

98-
<script src="{% static 'web3auth/js/web3auth.js' %}"></script>
98+
<script src="{% static 'scatterauth/js/scatterauth.js' %}"></script>
9999

100100

101101
.. code-block:: javascript
@@ -106,7 +106,7 @@ Add some javascript to handle login:
106106
if (!loggedIn) {
107107
alert("Please unlock your web3 provider (probably, Metamask)")
108108
} else {
109-
var login_url = '{% url 'web3auth_login_api' %}';
109+
var login_url = '{% url 'scatterauth_login_api' %}';
110110
web3Login(login_url, console.log, console.log, console.log, console.log, console.log, function (resp) {
111111
console.log(resp);
112112
window.location.replace(resp.redirect_url);
@@ -119,9 +119,9 @@ Add some javascript to handle login:
119119
}
120120
}
121121
122-
You can access signup using {% url 'web3auth_signup' %}.
122+
You can access signup using {% url 'scatterauth_signup' %}.
123123

124-
If you have any questions left, head to the example app https://github.com/Bearle/django-web3-auth/tree/master/example
124+
If you have any questions left, head to the example app https://github.com/Bearle/django-scatter-auth/tree/master/example
125125

126126

127127

docs/conf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
parent = os.path.dirname(cwd)
2323
sys.path.append(parent)
2424

25-
import web3auth
25+
import scatterauth
2626

2727
# -- General configuration -----------------------------------------------------
2828

@@ -54,9 +54,9 @@
5454
# built documents.
5555
#
5656
# The short X.Y version.
57-
version = web3auth.__version__
57+
version = scatterauth.__version__
5858
# The full version, including alpha/beta/rc tags.
59-
release = web3auth.__version__
59+
release = scatterauth.__version__
6060

6161
# The language for content autogenerated by Sphinx. Refer to documentation
6262
# for a list of supported languages.

example/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Example Project for scatter-auth
1+
Example Project for django-scatter-auth
22

33
This example is provided as a convenience feature to allow potential users to try the app straight from the app repo without having to create a django project.
44

example/example/settings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
'django.contrib.messages',
3737
'django.contrib.staticfiles',
3838

39-
'web3auth',
39+
'scatterauth',
4040

4141
# if your app has other dependencies that need to be added to the site
4242
# they should be added here
@@ -111,7 +111,7 @@
111111

112112
AUTHENTICATION_BACKENDS = [
113113
'django.contrib.auth.backends.ModelBackend',
114-
'web3auth.backend.Web3Backend'
114+
'scatterauth.backend.Web3Backend'
115115
]
116116
# Internationalization
117117
# https://docs.djangoproject.com/en/1.9/topics/i18n/

example/example/urls.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ def auto_login(request):
3838
url(r'^$', RedirectView.as_view(url='/login')),
3939
url(r'^login/', login, name='login'),
4040
url(r'^auto_login/', auto_login, name='autologin'),
41-
url(r'', include('web3auth.urls')),
41+
url(r'', include('scatterauth.urls')),
4242
]

example/templates/web3auth/base.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="utf-8">
66
<meta http-equiv="x-ua-compatible" content="ie=edge">
7-
<title>{% block title %}Django-Web3-Auth{% endblock title %}</title>
7+
<title>{% block title %}Django-Scatter-Auth{% endblock title %}</title>
88
<meta name="viewport" content="width=device-width, initial-scale=1.0">
99
<meta name="description" content="">
1010
<meta name="author" content="">
@@ -33,7 +33,7 @@
3333
aria-label="Toggle navigation">
3434
<span class="navbar-toggler-icon"></span>
3535
</button>
36-
<a class="navbar-brand" href="#">Django web3 auth</a>
36+
<a class="navbar-brand" href="#">Django Scatter auth</a>
3737

3838
<div class="collapse navbar-collapse" id="navbarSupportedContent">
3939
<ul class="navbar-nav mr-auto">
@@ -68,7 +68,7 @@
6868
<div class="row m-t-2">
6969
<p>Use this document as a way to quick start any new project.</p>
7070
<p>The current template is loaded from
71-
<code>django-web3-auth/example/templates/base.html</code>. </p>
71+
<code>django-scatter-auth/example/templates/base.html</code>. </p>
7272
<p>Whenever you overwrite the contents of <code>django-web3-auth/web3auth/urls.py</code> with your
7373
own content, you should see it here.</p>
7474
</div>
@@ -109,7 +109,7 @@
109109

110110
</script>
111111
<!-- Your stuff: Third-party javascript libraries go here -->
112-
<script src="{% static 'web3auth/js/web3auth.js' %}"></script>
112+
<script src="{% static 'web3auth/js/scatterauth.js' %}"></script>
113113

114114
{% endblock javascript %}
115115
</body>
File renamed without changes.
File renamed without changes.

web3auth/apps.py scatterauth/apps.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33

44
class Web3AuthConfig(AppConfig):
5-
name = 'web3auth'
5+
name = 'scatterauth'

web3auth/backend.py scatterauth/backend.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from django.contrib.auth import get_user_model, backends
22

3-
from web3auth.utils import validate_signature
4-
from web3auth.settings import app_settings
3+
from scatterauth.utils import validate_signature
4+
from scatterauth.settings import app_settings
55

66
class Web3Backend(backends.ModelBackend):
77
def authenticate(self, request, address=None, pubkey=None, token=None, signature=None):

web3auth/forms.py scatterauth/forms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from django.contrib.auth import authenticate, get_user_model
55

66
from django.utils.translation import ugettext_lazy as _
7-
from web3auth.settings import app_settings
7+
from scatterauth.settings import app_settings
88

99

1010
class LoginForm(forms.Form):
File renamed without changes.
File renamed without changes.

web3auth/static/web3auth/js/web3auth.js scatterauth/static/web3auth/js/scatterauth.js

+2-11
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,13 @@ function loginWithSignature(pubkey, signature, address, login_url, onLoginReques
5252
request.send(formData);
5353
}
5454

55-
function checkWeb3(callback) {
56-
web3.eth.getAccounts((err, accounts) => { // Check for wallet being locked
57-
if (err) {
58-
throw err;
59-
}
60-
callback(accounts.length !== 0);
61-
});
62-
}
63-
6455
function scatterLogin(login_url, onTokenRequestFail, onTokenSignFail, onTokenSignSuccess, // used in this function
6556
onLoginRequestError, onLoginFail, onLoginSuccess) {
6657
// used in loginWithSignature
6758

6859
// 1. Retrieve arbitrary login token from server
69-
// 2. Sign it using web3
70-
// 3. Send signed message & your eth address to server
60+
// 2. Sign it using scatter
61+
// 3. Send signed message & your eos account name & public key to server
7162
// 4. If server validates that you signature is valid
7263
// 4.1 The user with an according eth address is found - you are logged in
7364
// 4.2 The user with an according eth address is NOT found - you are redirected to signup page
File renamed without changes.

web3auth/urls.py scatterauth/urls.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.conf.urls import url
22

3-
from web3auth import views
3+
from scatterauth import views
44

55
urlpatterns = [
66
url(r'^login_api/$', views.login_api, name='web3auth_login_api'),
File renamed without changes.

0 commit comments

Comments
 (0)