Exemple #1
0
#! /usr/bin/env python
# $Header$
'''Simple CGI dispatching.
'''

from pysphere.ZSI import TC
import base64, os

from pysphere.ZSI import ZSI_SCHEMA_URI

_b64_decode = base64.decodestring

# Typecode to parse a ZSI BasicAuth header.
_auth_tc = TC.Struct(None,
                        [ TC.String('Name'), TC.String('Password') ],
                        extras=1)

class AUTH:
    '''Constants for authentication mechanisms.
    '''
    none = 0
    httpbasic = 1
    zsibasic = 2
    httpdigest = 4

class ClientBinding:
    '''Information about the client that is connected to us.
    '''

    def __init__(self, ps):
        self.ps, self.auth = \
Exemple #2
0
#! /usr/bin/env python
# $Header$
'''Simple CGI dispatching.
'''

from pysphere.ZSI import TC
import base64, os

from pysphere.ZSI import ZSI_SCHEMA_URI

_b64_decode = base64.decodestring

# Typecode to parse a ZSI BasicAuth header.
_auth_tc = TC.Struct(
    None, [TC.String('Name'), TC.String('Password')], extras=1)


class AUTH:
    '''Constants for authentication mechanisms.
    '''
    none = 0
    httpbasic = 1
    zsibasic = 2
    httpdigest = 4


class ClientBinding:
    '''Information about the client that is connected to us.
    '''
    def __init__(self, ps):
        self.ps, self.auth = \