summaryrefslogtreecommitdiff
path: root/source4/auth/credentials/credentials.py
blob: fd00a8e6f0876fc6f7145452586150c1c8b9d452 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 1.3.35
#
# Don't modify this file, modify the SWIG interface instead.

import _credentials
import new
new_instancemethod = new.instancemethod
try:
    _swig_property = property
except NameError:
    pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
    if (name == "thisown"): return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'PySwigObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name,None)
    if method: return method(self,value)
    if (not static) or hasattr(self,name):
        self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)

def _swig_setattr(self,class_type,name,value):
    return _swig_setattr_nondynamic(self,class_type,name,value,0)

def _swig_getattr(self,class_type,name):
    if (name == "thisown"): return self.this.own()
    method = class_type.__swig_getmethods__.get(name,None)
    if method: return method(self)
    raise AttributeError,name

def _swig_repr(self):
    try: strthis = "proxy of " + self.this.__repr__()
    except: strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

import types
try:
    _object = types.ObjectType
    _newclass = 1
except AttributeError:
    class _object : pass
    _newclass = 0
del types


def _swig_setattr_nondynamic_method(set):
    def set_attr(self,name,value):
        if (name == "thisown"): return self.this.own(value)
        if hasattr(self,name) or (name == "this"):
            set(self,name,value)
        else:
            raise AttributeError("You cannot add attributes to %s" % self)
    return set_attr


import param
AUTO_USE_KERBEROS = _credentials.AUTO_USE_KERBEROS
DONT_USE_KERBEROS = _credentials.DONT_USE_KERBEROS
MUST_USE_KERBEROS = _credentials.MUST_USE_KERBEROS
class Credentials(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    def __init__(self, *args, **kwargs): 
        _credentials.Credentials_swiginit(self,_credentials.new_Credentials(*args, **kwargs))
    def get_username(*args, **kwargs):
        """
        S.get_username() -> username
        Obtain username.
        """
        return _credentials.Credentials_get_username(*args, **kwargs)

    def set_username(*args, **kwargs):
        """
        S.set_username(name, obtained=CRED_SPECIFIED) -> None
        Change username.
        """
        return _credentials.Credentials_set_username(*args, **kwargs)

    def get_password(*args, **kwargs):
        """
        S.get_password() -> password
        Obtain password.
        """
        return _credentials.Credentials_get_password(*args, **kwargs)

    def set_password(*args, **kwargs):
        """
        S.set_password(password, obtained=CRED_SPECIFIED) -> None
        Change password.
        """
        return _credentials.Credentials_set_password(*args, **kwargs)

    def set_domain(*args, **kwargs):
        """
        S.set_domain(domain, obtained=CRED_SPECIFIED) -> None
        Change domain name.
        """
        return _credentials.Credentials_set_domain(*args, **kwargs)

    def get_realm(*args, **kwargs):
        """
        S.get_realm() -> realm
        Obtain realm name.
        """
        return _credentials.Credentials_get_realm(*args, **kwargs)

    def set_realm(*args, **kwargs):
        """
        S.set_realm(realm, obtained=CRED_SPECIFIED) -> None
        Change realm name.
        """
        return _credentials.Credentials_set_realm(*args, **kwargs)

    def parse_string(*args, **kwargs):
        """
        S.parse_string(text, obtained=CRED_SPECIFIED) -> None
        Parse credentials string.
        """
        return _credentials.Credentials_parse_string(*args, **kwargs)

    def get_bind_dn(*args, **kwargs):
        """
        S.get_bind_dn() -> bind dn
        Obtain bind DN.
        """
        return _credentials.Credentials_get_bind_dn(*args, **kwargs)

    def set_bind_dn(*args, **kwargs):
        """
        S.set_bind_dn(bind_dn) -> None
        Change bind DN.
        """
        return _credentials.Credentials_set_bind_dn(*args, **kwargs)

    def set_anonymous(*args, **kwargs):
        """
        S.set_anonymous() -> None
        Use anonymous credentials.
        """
        return _credentials.Credentials_set_anonymous(*args, **kwargs)

    def wrong_password(*args, **kwargs):
        """
        S.wrong_password() -> bool
        Indicate the returned password was incorrect.
        """
        return _credentials.Credentials_wrong_password(*args, **kwargs)

    def set_cmdline_callbacks(*args, **kwargs):
        """
        S.set_cmdline_callbacks() -> bool
        Use command-line to obtain credentials not explicitly set.
        """
        return _credentials.Credentials_set_cmdline_callbacks(*args, **kwargs)

    __swig_destroy__ = _credentials.delete_Credentials
Credentials.get_username = new_instancemethod(_credentials.Credentials_get_username,None,Credentials)
Credentials.set_username = new_instancemethod(_credentials.Credentials_set_username,None,Credentials)
Credentials.get_password = new_instancemethod(_credentials.Credentials_get_password,None,Credentials)
Credentials.set_password = new_instancemethod(_credentials.Credentials_set_password,None,Credentials)
Credentials.get_domain = new_instancemethod(_credentials.Credentials_get_domain,None,Credentials)
Credentials.set_domain = new_instancemethod(_credentials.Credentials_set_domain,None,Credentials)
Credentials.get_realm = new_instancemethod(_credentials.Credentials_get_realm,None,Credentials)
Credentials.set_realm = new_instancemethod(_credentials.Credentials_set_realm,None,Credentials)
Credentials.set_kerberos_state = new_instancemethod(_credentials.Credentials_set_kerberos_state,None,Credentials)
Credentials.parse_string = new_instancemethod(_credentials.Credentials_parse_string,None,Credentials)
Credentials.get_bind_dn = new_instancemethod(_credentials.Credentials_get_bind_dn,None,Credentials)
Credentials.set_bind_dn = new_instancemethod(_credentials.Credentials_set_bind_dn,None,Credentials)
Credentials.set_anonymous = new_instancemethod(_credentials.Credentials_set_anonymous,None,Credentials)
Credentials.get_workstation = new_instancemethod(_credentials.Credentials_get_workstation,None,Credentials)
Credentials.set_workstation = new_instancemethod(_credentials.Credentials_set_workstation,None,Credentials)
Credentials.set_machine_account = new_instancemethod(_credentials.Credentials_set_machine_account,None,Credentials)
Credentials.guess = new_instancemethod(_credentials.Credentials_guess,None,Credentials)
Credentials.is_anonymous = new_instancemethod(_credentials.Credentials_is_anonymous,None,Credentials)
Credentials.get_nt_hash = new_instancemethod(_credentials.Credentials_get_nt_hash,None,Credentials)
Credentials.authentication_requested = new_instancemethod(_credentials.Credentials_authentication_requested,None,Credentials)
Credentials.wrong_password = new_instancemethod(_credentials.Credentials_wrong_password,None,Credentials)
Credentials.set_cmdline_callbacks = new_instancemethod(_credentials.Credentials_set_cmdline_callbacks,None,Credentials)
Credentials_swigregister = _credentials.Credentials_swigregister
Credentials_swigregister(Credentials)