Permalink
Browse files

polish

  • Loading branch information...
1 parent ee09fe4 commit 73cd5bac07cb5a292e87f94ac90fc9f65a73e252 @oberstet oberstet committed Jul 28, 2016
View
@@ -34,7 +34,7 @@ news: towncrier.ini crossbar/newsfragments/*.*
echo You should now 'git commit -m "update NEWS and ChangeLog"' the result, if happy.
docs:
- towncrier --draft > docs/pages/ChangeLog.md
+ # towncrier --draft > docs/pages/ChangeLog.md
python docs/test_server.py
# call this in a fresh virtualenv to update our frozen requirements.txt!
@@ -0,0 +1 @@
+Serialization error with channel ID
@@ -0,0 +1 @@
+Universal transport: allows to run RawSocket, WebSocket and Web all on one listening endpoint
@@ -62,6 +62,9 @@ def __init__(self, session, config):
PendingAuth.__init__(self, session, config)
self._verify_key = None
+ # https://tools.ietf.org/html/rfc5056
+ # https://tools.ietf.org/html/rfc5929
+ # https://www.ietf.org/proceedings/90/slides/slides-90-uta-0.pdf
channel_id_hex = session._transport._transport_info.get(u'channel_id', None)
if channel_id_hex:
self._channel_id = binascii.a2b_hex(channel_id_hex)
@@ -322,13 +322,28 @@ class RouterRoleDynamicAuth(RouterRole):
def __init__(self, router, uri, authorizer):
"""
- Ctor.
- :param uri: The URI of the role.
- :type uri: str
+ :param router: The router to which to add the role
+ :type router: instance of ``crossbar.router.router.Router``
+ :param id: The URI of the role.
+ :type id: unicode
+ :param authorizer: The dynamic authroizer configuration.
+ :type authorizer: dict
"""
RouterRole.__init__(self, router, uri)
+
+ # the URI (identifying name) of the authorizer
+ self._uri = uri
+
+ # the dynamic authorizer configuration
+ # {
+ # "name": "app",
+ # "authorizer": "com.example.auth"
+ # }
self._authorizer = authorizer
+
+ # the session from which to call the dynamic authorizer: this is
+ # the default service session on the realm
self._session = router._realm.session
def authorize(self, session, uri, action):
@@ -346,10 +361,12 @@ def authorize(self, session, uri, action):
:return: bool -- Flag indicating whether session is authorized or not.
"""
self.log.debug(
- "CrossbarRouterRoleDynamicAuth.authorize {myuri} {uri} {action}",
- myuri=self.uri, uri=uri, action=action)
- return self._session.call(self._authorizer, session._session_details,
- uri, action)
+ "CrossbarRouterRoleDynamicAuth.authorize {uri} {action}",
+ uri=uri, action=action)
+ return self._session.call(self._authorizer,
+ getattr(session, '_session_details', None),
+ uri,
+ action)
class RouterRoleLMDBAuth(RouterRole):
@@ -88,7 +88,7 @@
{% block content %}{% endblock %}
<center style="font-size: 0.76em; line-height: 1.4em;">
- <a href="http://crossbar.io">Crossbar.io</a> running at version {{ cbVersion }}. Copyright &copy; 2011-2015 <a href="http://tavendo.com">Tavendo GmbH</a>.
+ <a href="http://crossbar.io">Crossbar.io</a> running at version {{ cbVersion }}. Copyright &copy; 2011-2016 <a href="http://tavendo.com">Tavendo GmbH</a>.
</center>
</div>
</body>
@@ -3,7 +3,7 @@
{% block main %}
<h1>Crossbar.io Docs [DEV]</h1>
<p>
- This is the development version of the <strong><a href="docs">Crossbar.io Documentation</a></strong>.
+ This is the development version of the <strong><a href="/Documentation">Crossbar.io Documentation</a></strong>.
</p>
<p>
The contents here is exactly the same as deployed on <strong><a href="http://crossbar.io/docs/">http://crossbar.io/docs/</a></strong>, but without styling and embedding into the larger Crossbar.io web site.
View
@@ -25,11 +25,10 @@ def page_home():
@app.route('/docs/<path:path>/')
-@app.route('/docs/')
def page_docs(path = None):
if path is None or path.strip() == "":
title = 'Documentation'
- path = 'Home'
+ path = 'Documentation'
else:
title = path.replace('-', ' ')
@@ -4,8 +4,9 @@ mock>=1.3.0
wheel>=0.26.0
hashin>=0.4.1
-# for doc testing
+# docs
flask
pygments
jinja2_highlight
mistune
+towncrier

0 comments on commit 73cd5ba

Please sign in to comment.