cc1  v2.1
CC1 source code docs
 All Classes Namespaces Files Functions Variables Pages
src.clm.views.guest.user Namespace Reference

Functions

def check_password
 Checks User password's correctness.
def check_signature
 Authenticate S3 request by checking parameters passed by EC2.
def register
 Registers new user.

Detailed Description

Author
Gaetano
Date
May 14, 2013
Note
All functions here are decorated by src.clm.utils.decorators.guest_log. It's recommended to read src.clm.utils.decorators.guest_log docs before using functions below.

Function Documentation

def src.clm.views.guest.user.check_password (   login,
  password 
)

Checks User password's correctness.

Note
The clm.utils.decorators.guest_log decorator provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.guest_log
Parameters
http_request(HttpRequest)
login(POST) user's login
password(POST) password to check
Returns
HttpResponse with JSON content:
  • response: response status,
  • data: (bool) False if password isn't correct
HttpResponse with JSON content:
  • response: response status,
  • data: (dict) User.dict() property if password is correct

Definition at line 59 of file user.py.

def src.clm.views.guest.user.check_signature (   parameters)

Authenticate S3 request by checking parameters passed by EC2.

Note
The clm.utils.decorators.guest_log decorator provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.guest_log
Parameters
http_request(HttpRequest)
parameters(POST) dict with all S3 request headers

Definition at line 88 of file user.py.

def src.clm.views.guest.user.register (   first,
  last,
  login,
  email,
  new_password,
  organization,
  wi_data 
)

Registers new user.

Note
The clm.utils.decorators.guest_log decorator provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.guest_log
Parameters
http_request(HttpRequest)
first(POST string) firstname to set
last(POST string) lastname to set
login(POST string) login to set
email(POST string) email to set
new_password(POST string) password to set
organization(POST string) organization to set
wi_data(POST dict) data for sending mail
Returns
HttpResponse with JSON content:
  • response: response status,
  • data: (dict)
    • user (dict) user's data (User.dict() property)
    • registration_state (int) state of reqistration see also: common.states.registration_state

Definition at line 129 of file user.py.