You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@senssoft.apache.org by ar...@apache.org on 2016/10/21 16:12:02 UTC

[09/48] incubator-senssoft-tap git commit: Implementing token return endpoint

Implementing token return endpoint

work in progress


Project: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-tap/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-tap/commit/8c116e73
Tree: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-tap/tree/8c116e73
Diff: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-tap/diff/8c116e73

Branch: refs/heads/master
Commit: 8c116e732d717087be561916aa701e324d78ceb7
Parents: 2830767
Author: Arthi Vezhavendan <ar...@gmail.com>
Authored: Thu Jul 21 10:14:07 2016 -0400
Committer: Arthi Vezhavendan <ar...@gmail.com>
Committed: Thu Jul 21 10:14:07 2016 -0400

----------------------------------------------------------------------
 app_mgr/views.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-senssoft-tap/blob/8c116e73/app_mgr/views.py
----------------------------------------------------------------------
diff --git a/app_mgr/views.py b/app_mgr/views.py
index 0fc88c6..3dbbec0 100644
--- a/app_mgr/views.py
+++ b/app_mgr/views.py
@@ -255,13 +255,17 @@ def login_user(request):
                 # If the account is valid and active, we can log the user in.
                 # We'll send the user back to the homepage.
                 login(request, user)
-                return HttpResponseRedirect('/app_mgr/user_profile/')
+                userToken = "HttpRequest"
+                print( "Successful Login: {0}, id: {1}, token: {2}".format(email, user.id, userToken) )
+                #return HttpResponseRedirect('/app_mgr/user_profile/')
+                return HttpResponse("Successful Login: {0}, id: {1}, token: {2}".format(email, user.id, userToken))
+                #return HttpResponseRedirect('../../api-token-auth/')
             else:
                 # An inactive account was used - no logging in!
                 return HttpResponse("Your TAP account is disabled.")
         else:
             # Bad login details were provided. So we can't log the user in.
-            print( "Invalid login details: {0}, {1}".format(email, password) )
+            print( "Invalid login details: {0}, {1}".format(email, password) ) ###TODO - PASSWORD EXPOSED
             return HttpResponse("Invalid login details supplied.")
 
     # The request is not a HTTP POST, so display the login form.