Changeset 10499 for main/waeup.cas


Ignore:
Timestamp:
13 Aug 2013, 17:01:07 (11 years ago)
Author:
uli
Message:

Handle service ticket generation correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.cas/trunk/waeup/cas/server.py

    r10494 r10499  
    197197
    198198
    199 def login_redirect_service(db, service, sso=True, create_ticket=True,
    200                            warn=False):
     199def login_redirect_service(db, user, service, sso=True,
     200                           create_ticket=True, warn=False):
    201201    """Return a response redirecting to a service via HTTP 303 See Other.
    202202    """
    203203    if create_ticket:
    204         st = create_service_ticket(service, sso)
     204        st = create_service_ticket(user, service, sso)
    205205        db.add(st)
    206206        service = update_url(service, dict(ticket=st.ticket))
     
    290290        if gateway and (not tgc) and service:
    291291            return login_redirect_service(
    292                 self.db, service, sso=True, create_ticket=False)
     292                self.db, username, service, sso=True, create_ticket=False)
    293293        if tgc and (renew is None):
    294294            if service:
    295295                return login_redirect_service(
    296                     self.db, service, sso=True, warn=warn)
     296                    self.db, username, service, sso=True, warn=warn)
    297297            else:
    298298                return login_success_no_service(
     
    309309                    # safely redirect to service given
    310310                    return login_redirect_service(
    311                         self.db, service, sso=False, warn=warn)
     311                        self.db, username, service, sso=False, warn=warn)
    312312            else:
    313313                # login failed
Note: See TracChangeset for help on using the changeset viewer.