1 # This file was automatically generated by SWIG (http://www.swig.org).
4 # Don't modify this file, modify the SWIG interface instead.
7 Credentials management.
12 new_instancemethod
= new
.instancemethod
14 _swig_property
= property
16 pass # Python < 2.2 doesn't have 'property'.
17 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
18 if (name
== "thisown"): return self
.this
.own(value
)
20 if type(value
).__name
__ == 'PySwigObject':
21 self
.__dict
__[name
] = value
23 method
= class_type
.__swig
_setmethods
__.get(name
,None)
24 if method
: return method(self
,value
)
25 if (not static
) or hasattr(self
,name
):
26 self
.__dict
__[name
] = value
28 raise AttributeError("You cannot add attributes to %s" % self
)
30 def _swig_setattr(self
,class_type
,name
,value
):
31 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
33 def _swig_getattr(self
,class_type
,name
):
34 if (name
== "thisown"): return self
.this
.own()
35 method
= class_type
.__swig
_getmethods
__.get(name
,None)
36 if method
: return method(self
)
37 raise AttributeError,name
40 try: strthis
= "proxy of " + self
.this
.__repr
__()
42 return "<%s.%s; %s >" % (self
.__class
__.__module
__, self
.__class
__.__name
__, strthis
,)
46 _object
= types
.ObjectType
48 except AttributeError:
54 def _swig_setattr_nondynamic_method(set):
55 def set_attr(self
,name
,value
):
56 if (name
== "thisown"): return self
.this
.own(value
)
57 if hasattr(self
,name
) or (name
== "this"):
60 raise AttributeError("You cannot add attributes to %s" % self
)
65 AUTO_USE_KERBEROS
= _credentials
.AUTO_USE_KERBEROS
66 DONT_USE_KERBEROS
= _credentials
.DONT_USE_KERBEROS
67 MUST_USE_KERBEROS
= _credentials
.MUST_USE_KERBEROS
68 class Credentials(object):
69 thisown
= _swig_property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
71 def __init__(self
, *args
, **kwargs
):
72 _credentials
.Credentials_swiginit(self
,_credentials
.new_Credentials(*args
, **kwargs
))
73 def get_username(*args
, **kwargs
):
75 S.get_username() -> username
78 return _credentials
.Credentials_get_username(*args
, **kwargs
)
80 def set_username(*args
, **kwargs
):
82 S.set_username(name, obtained=CRED_SPECIFIED) -> None
85 return _credentials
.Credentials_set_username(*args
, **kwargs
)
87 def get_password(*args
, **kwargs
):
89 S.get_password() -> password
92 return _credentials
.Credentials_get_password(*args
, **kwargs
)
94 def set_password(*args
, **kwargs
):
96 S.set_password(password, obtained=CRED_SPECIFIED) -> None
99 return _credentials
.Credentials_set_password(*args
, **kwargs
)
101 def set_domain(*args
, **kwargs
):
103 S.set_domain(domain, obtained=CRED_SPECIFIED) -> None
106 return _credentials
.Credentials_set_domain(*args
, **kwargs
)
108 def get_realm(*args
, **kwargs
):
110 S.get_realm() -> realm
113 return _credentials
.Credentials_get_realm(*args
, **kwargs
)
115 def set_realm(*args
, **kwargs
):
117 S.set_realm(realm, obtained=CRED_SPECIFIED) -> None
120 return _credentials
.Credentials_set_realm(*args
, **kwargs
)
122 def parse_string(*args
, **kwargs
):
124 S.parse_string(text, obtained=CRED_SPECIFIED) -> None
125 Parse credentials string.
127 return _credentials
.Credentials_parse_string(*args
, **kwargs
)
129 def get_bind_dn(*args
, **kwargs
):
131 S.get_bind_dn() -> bind dn
134 return _credentials
.Credentials_get_bind_dn(*args
, **kwargs
)
136 def set_bind_dn(*args
, **kwargs
):
138 S.set_bind_dn(bind_dn) -> None
141 return _credentials
.Credentials_set_bind_dn(*args
, **kwargs
)
143 def set_anonymous(*args
, **kwargs
):
145 S.set_anonymous() -> None
146 Use anonymous credentials.
148 return _credentials
.Credentials_set_anonymous(*args
, **kwargs
)
150 def wrong_password(*args
, **kwargs
):
152 S.wrong_password() -> bool
153 Indicate the returned password was incorrect.
155 return _credentials
.Credentials_wrong_password(*args
, **kwargs
)
157 def set_cmdline_callbacks(*args
, **kwargs
):
159 S.set_cmdline_callbacks() -> bool
160 Use command-line to obtain credentials not explicitly set.
162 return _credentials
.Credentials_set_cmdline_callbacks(*args
, **kwargs
)
164 __swig_destroy__
= _credentials
.delete_Credentials
165 Credentials
.get_username
= new_instancemethod(_credentials
.Credentials_get_username
,None,Credentials
)
166 Credentials
.set_username
= new_instancemethod(_credentials
.Credentials_set_username
,None,Credentials
)
167 Credentials
.get_password
= new_instancemethod(_credentials
.Credentials_get_password
,None,Credentials
)
168 Credentials
.set_password
= new_instancemethod(_credentials
.Credentials_set_password
,None,Credentials
)
169 Credentials
.get_domain
= new_instancemethod(_credentials
.Credentials_get_domain
,None,Credentials
)
170 Credentials
.set_domain
= new_instancemethod(_credentials
.Credentials_set_domain
,None,Credentials
)
171 Credentials
.get_realm
= new_instancemethod(_credentials
.Credentials_get_realm
,None,Credentials
)
172 Credentials
.set_realm
= new_instancemethod(_credentials
.Credentials_set_realm
,None,Credentials
)
173 Credentials
.set_kerberos_state
= new_instancemethod(_credentials
.Credentials_set_kerberos_state
,None,Credentials
)
174 Credentials
.parse_string
= new_instancemethod(_credentials
.Credentials_parse_string
,None,Credentials
)
175 Credentials
.get_bind_dn
= new_instancemethod(_credentials
.Credentials_get_bind_dn
,None,Credentials
)
176 Credentials
.set_bind_dn
= new_instancemethod(_credentials
.Credentials_set_bind_dn
,None,Credentials
)
177 Credentials
.set_anonymous
= new_instancemethod(_credentials
.Credentials_set_anonymous
,None,Credentials
)
178 Credentials
.get_workstation
= new_instancemethod(_credentials
.Credentials_get_workstation
,None,Credentials
)
179 Credentials
.set_workstation
= new_instancemethod(_credentials
.Credentials_set_workstation
,None,Credentials
)
180 Credentials
.set_machine_account
= new_instancemethod(_credentials
.Credentials_set_machine_account
,None,Credentials
)
181 Credentials
.guess
= new_instancemethod(_credentials
.Credentials_guess
,None,Credentials
)
182 Credentials
.is_anonymous
= new_instancemethod(_credentials
.Credentials_is_anonymous
,None,Credentials
)
183 Credentials
.get_nt_hash
= new_instancemethod(_credentials
.Credentials_get_nt_hash
,None,Credentials
)
184 Credentials
.authentication_requested
= new_instancemethod(_credentials
.Credentials_authentication_requested
,None,Credentials
)
185 Credentials
.wrong_password
= new_instancemethod(_credentials
.Credentials_wrong_password
,None,Credentials
)
186 Credentials
.set_cmdline_callbacks
= new_instancemethod(_credentials
.Credentials_set_cmdline_callbacks
,None,Credentials
)
187 Credentials_swigregister
= _credentials
.Credentials_swigregister
188 Credentials_swigregister(Credentials
)