Merge lp://staging/~gary/charms/precise/juju-gui/authtoken2 into lp://staging/~juju-gui/charms/precise/juju-gui/trunk

Proposed by Gary Poster
Status: Merged
Merged at revision: 137
Proposed branch: lp://staging/~gary/charms/precise/juju-gui/authtoken2
Merge into: lp://staging/~juju-gui/charms/precise/juju-gui/trunk
Prerequisite: lp://staging/~gary/charms/precise/juju-gui/authtoken1
Diff against target: 170 lines (+40/-9)
7 files modified
server/guiserver/apps.py (+3/-0)
server/guiserver/auth.py (+3/-1)
server/guiserver/handlers.py (+6/-4)
server/guiserver/tests/test_apps.py (+7/-0)
server/guiserver/tests/test_auth.py (+6/-1)
server/guiserver/tests/test_handlers.py (+9/-3)
server/guiserver/tests/test_utils.py (+6/-0)
To merge this branch: bzr merge lp://staging/~gary/charms/precise/juju-gui/authtoken2
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+196351@code.staging.launchpad.net

Description of the change

No-op integration of AuthenticationTokenHandler

This branch simply hooks up the AuthenticationTokenHandler everywhere it needs to be. It isn't actually utilized yet.

https://codereview.appspot.com/30980044/

To post a comment you must log in.
Revision history for this message
Gary Poster (gary) wrote :
Download full text (8.5 KiB)

Reviewers: mp+196351_code.launchpad.net,

Message:
Please take a look.

Description:
No-op integration of AuthenticationTokenHandler

This branch simply hooks up the AuthenticationTokenHandler everywhere it
needs to be. It isn't actually utilized yet. That will be the next
branch (which has been sketched but will not arrive within the next 30
minutes :-) ). No QA.

https://code.launchpad.net/~gary/charms/precise/juju-gui/authtoken2/+merge/196351

Requires:
https://code.launchpad.net/~gary/charms/precise/juju-gui/authtoken1/+merge/196347

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/30980044/

Affected files (+42, -9 lines):
   A [revision details]
   M server/guiserver/apps.py
   M server/guiserver/auth.py
   M server/guiserver/handlers.py
   M server/guiserver/tests/test_apps.py
   M server/guiserver/tests/test_auth.py
   M server/guiserver/tests/test_handlers.py
   M server/guiserver/tests/test_utils.py

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>

Index: server/guiserver/apps.py
=== modified file 'server/guiserver/apps.py'
--- server/guiserver/apps.py 2013-11-14 14:08:23 +0000
+++ server/guiserver/apps.py 2013-11-22 15:53:02 +0000
@@ -44,6 +44,7 @@
      # Set up handlers.
      server_handlers = []
      if not options.sandbox:
+ tokens = auth.AuthenticationTokenHandler()
          websocket_handler_options = {
              # The Juju API backend url.
              'apiurl': options.apiurl,
@@ -51,6 +52,8 @@
              'auth_backend': auth.get_backend(options.apiversion),
              # The Juju deployer to use for importing bundles.
              'deployer': deployer,
+ # The tokens collection for authentication token requests.
+ 'tokens': tokens,
          }
          server_handlers.append(
              # Handle WebSocket connections.

Index: server/guiserver/auth.py
=== modified file 'server/guiserver/auth.py'
--- server/guiserver/auth.py 2013-11-22 18:06:17 +0000
+++ server/guiserver/auth.py 2013-11-22 18:10:50 +0000
@@ -71,9 +71,11 @@
      user logs out, there is no need to handle the log out process.
      """

- def __init__(self, user, backend):
+ def __init__(self, user, backend, tokens, write_message):
          self._user = user
          self._backend = backend
+ self._tokens = tokens
+ self._write_message = write_message
          self._request_id = None

      def in_progress(self):

Index: server/guiserver/handlers.py
=== modified file 'server/guiserver/handlers.py'
--- server/guiserver/handlers.py 2013-11-07 18:04:32 +0000
+++ server/guiserver/handlers.py 2013-11-22 15:53:02 +0000
@@ -69,7 +69,7 @@
      """

      @gen.coroutine
- def initialize(self, apiurl, auth_backend, deployer, io_loop=None):
+ def initialize(self, apiurl, auth_backend, deployer, tokens,
io_loop=None):
          """Initialize the WebSocket server.

  ...

Read more...

142. By Gary Poster

merge from parent

Revision history for this message
Gary Poster (gary) wrote :
Revision history for this message
Francesco Banconi (frankban) wrote :
Revision history for this message
Gary Poster (gary) wrote :

*** Submitted:

No-op integration of AuthenticationTokenHandler

This branch simply hooks up the AuthenticationTokenHandler everywhere it
needs to be. It isn't actually utilized yet.

R=frankban
CC=
https://codereview.appspot.com/30980044

https://codereview.appspot.com/30980044/

Revision history for this message
Gary Poster (gary) wrote :

On 2013/11/25 11:39:48, frankban wrote:
> LGTM thank you!

Thank you for the review, Francesco.

https://codereview.appspot.com/30980044/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: