-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Use pyasn1 in ldap3 #9470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Use pyasn1 in ldap3 #9470
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
97e09ac
Use pyasn1 in ldap3
Avasam 56c8ca2
Merge branch 'main' into pyasn1-in-ldap3
AlexWaygood dc9febd
Update types
Avasam 39e5f78
Merge branch 'pyasn1-in-ldap3' of https://github.com/Avasam/typeshed …
Avasam 32157f2
Merge branch 'main' of https://github.com/python/typeshed into pyasn1…
Avasam 397e783
PR comments
Avasam 97dafe4
All relative imports in ldap3
Avasam 5af90f1
Fix And/Or componentType
Avasam 41a7798
Merge branch 'main' into pyasn1-in-ldap3
AlexWaygood 4eef341
PR comments
Avasam b3ad5eb
Merge branch 'pyasn1-in-ldap3' of https://github.com/Avasam/typeshed …
Avasam e3564c8
Updated comments
Avasam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version = "2.9.*" | ||
requires = [] # requires types-pyasn1 (not available yet) | ||
requires = ["types-pyasn1"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
from typing import Any | ||
from _typeshed import Incomplete | ||
|
||
from ldap3.protocol.novell import EndGroupTypeResponseValue | ||
|
||
from ...extend.operation import ExtendedOperation | ||
|
||
class EndTransaction(ExtendedOperation): | ||
request_name: str | ||
response_name: str | ||
request_value: Any | ||
asn1_spec: Any | ||
request_value: Incomplete | ||
AlexWaygood marked this conversation as resolved.
Show resolved
Hide resolved
|
||
asn1_spec: EndGroupTypeResponseValue | None | ||
AlexWaygood marked this conversation as resolved.
Show resolved
Hide resolved
|
||
def config(self) -> None: ... | ||
def __init__(self, connection, commit: bool = ..., controls: Any | None = ...) -> None: ... | ||
def __init__(self, connection, commit: bool = ..., controls: Incomplete | None = ...) -> None: ... | ||
def populate_result(self) -> None: ... | ||
response_value: Any | ||
response_value: Incomplete | ||
def set_response(self) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
from typing import Any | ||
from ldap3.protocol.novell import Identity | ||
|
||
from ...extend.operation import ExtendedOperation | ||
|
||
class GetBindDn(ExtendedOperation): | ||
request_name: str | ||
response_name: str | ||
response_attribute: str | ||
asn1_spec: Any | ||
asn1_spec: Identity | None | ||
AlexWaygood marked this conversation as resolved.
Show resolved
Hide resolved
|
||
def config(self) -> None: ... | ||
def populate_result(self) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
from typing import Any | ||
from _typeshed import Incomplete | ||
|
||
from ldap3.protocol.novell import ReplicaList | ||
|
||
from ...extend.operation import ExtendedOperation | ||
|
||
class ListReplicas(ExtendedOperation): | ||
request_name: str | ||
response_name: str | ||
request_value: Any | ||
asn1_spec: Any | ||
request_value: Incomplete | ||
asn1_spec: ReplicaList | None | ||
response_attribute: str | ||
def config(self) -> None: ... | ||
def __init__(self, connection, server_dn, controls: Any | None = ...) -> None: ... | ||
def __init__(self, connection, server_dn, controls: Incomplete | None = ...) -> None: ... | ||
def populate_result(self) -> None: ... |
10 changes: 6 additions & 4 deletions
10
stubs/ldap3/ldap3/extend/novell/nmasGetUniversalPassword.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
from typing import Any | ||
from _typeshed import Incomplete | ||
|
||
from ldap3.protocol.novell import NmasGetUniversalPasswordResponseValue | ||
|
||
from ...extend.operation import ExtendedOperation | ||
|
||
class NmasGetUniversalPassword(ExtendedOperation): | ||
request_name: str | ||
response_name: str | ||
request_value: Any | ||
asn1_spec: Any | ||
request_value: Incomplete | ||
asn1_spec: NmasGetUniversalPasswordResponseValue | None | ||
response_attribute: str | ||
def config(self) -> None: ... | ||
def __init__(self, connection, user, controls: Any | None = ...) -> None: ... | ||
def __init__(self, connection, user, controls: Incomplete | None = ...) -> None: ... | ||
def populate_result(self) -> None: ... |
10 changes: 6 additions & 4 deletions
10
stubs/ldap3/ldap3/extend/novell/nmasSetUniversalPassword.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
from typing import Any | ||
from _typeshed import Incomplete | ||
|
||
from ldap3.protocol.novell import NmasSetUniversalPasswordResponseValue | ||
|
||
from ...extend.operation import ExtendedOperation | ||
|
||
class NmasSetUniversalPassword(ExtendedOperation): | ||
request_name: str | ||
response_name: str | ||
request_value: Any | ||
asn1_spec: Any | ||
request_value: Incomplete | ||
asn1_spec: NmasSetUniversalPasswordResponseValue | None | ||
response_attribute: str | ||
def config(self) -> None: ... | ||
def __init__(self, connection, user, new_password, controls: Any | None = ...) -> None: ... | ||
def __init__(self, connection, user, new_password, controls: Incomplete | None = ...) -> None: ... | ||
def populate_result(self) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
from typing import Any | ||
from _typeshed import Incomplete | ||
|
||
from ldap3.protocol.novell import CreateGroupTypeResponseValue | ||
|
||
from ...extend.operation import ExtendedOperation | ||
|
||
class StartTransaction(ExtendedOperation): | ||
request_name: str | ||
response_name: str | ||
request_value: Any | ||
asn1_spec: Any | ||
request_value: Incomplete | ||
asn1_spec: CreateGroupTypeResponseValue | None | ||
def config(self) -> None: ... | ||
def __init__(self, connection, controls: Any | None = ...) -> None: ... | ||
def __init__(self, connection, controls: Incomplete | None = ...) -> None: ... | ||
def populate_result(self) -> None: ... | ||
response_value: Any | ||
response_value: Incomplete | ||
def set_response(self) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
from typing import Any | ||
from _typeshed import Incomplete | ||
|
||
from pyasn1.type.base import Asn1Type | ||
|
||
class ExtendedOperation: | ||
connection: Any | ||
decoded_response: Any | ||
result: Any | ||
asn1_spec: Any | ||
request_name: Any | ||
response_name: Any | ||
request_value: Any | ||
response_value: Any | ||
response_attribute: Any | ||
controls: Any | ||
def __init__(self, connection, controls: Any | None = ...) -> None: ... | ||
connection: Incomplete | ||
decoded_response: Incomplete | ||
result: Incomplete | ||
asn1_spec: Asn1Type | None | ||
request_name: Incomplete | ||
response_name: Incomplete | ||
request_value: Incomplete | ||
response_value: Incomplete | ||
response_attribute: Incomplete | ||
controls: Incomplete | ||
def __init__(self, connection, controls: Incomplete | None = ...) -> None: ... | ||
def send(self): ... | ||
def populate_result(self) -> None: ... | ||
def decode_response(self, response: Any | None = ...) -> None: ... | ||
def decode_response(self, response: Incomplete | None = ...) -> None: ... | ||
def set_response(self) -> None: ... | ||
def config(self) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
from typing import Any | ||
from _typeshed import Incomplete | ||
|
||
from ldap3.protocol.rfc3062 import PasswdModifyResponseValue | ||
|
||
from ...extend.operation import ExtendedOperation | ||
|
||
class ModifyPassword(ExtendedOperation): | ||
request_name: str | ||
request_value: Any | ||
asn1_spec: Any | ||
request_value: Incomplete | ||
asn1_spec: PasswdModifyResponseValue | None | ||
response_attribute: str | ||
def config(self) -> None: ... | ||
def __init__( | ||
self, | ||
connection, | ||
user: Any | None = ..., | ||
old_password: Any | None = ..., | ||
new_password: Any | None = ..., | ||
hash_algorithm: Any | None = ..., | ||
salt: Any | None = ..., | ||
controls: Any | None = ..., | ||
user: Incomplete | None = ..., | ||
old_password: Incomplete | None = ..., | ||
new_password: Incomplete | None = ..., | ||
hash_algorithm: Incomplete | None = ..., | ||
salt: Incomplete | None = ..., | ||
controls: Incomplete | None = ..., | ||
) -> None: ... | ||
def populate_result(self) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,67 @@ | ||
from typing import Any | ||
from typing_extensions import TypeAlias | ||
|
||
# Enable when pyasn1 gets stubs: | ||
# from pyasn1.type.univ import Integer, OctetString, Sequence, SequenceOf | ||
_Integer: TypeAlias = Any | ||
_OctetString: TypeAlias = Any | ||
_Sequence: TypeAlias = Any | ||
_SequenceOf: TypeAlias = Any | ||
from pyasn1.type.namedtype import NamedTypes | ||
from pyasn1.type.tag import TagSet | ||
from pyasn1.type.univ import Integer, OctetString, Sequence, SequenceOf | ||
|
||
NMAS_LDAP_EXT_VERSION: int | ||
|
||
class Identity(_OctetString): | ||
class Identity(OctetString): | ||
encoding: str | ||
|
||
class LDAPDN(_OctetString): | ||
tagSet: Any | ||
class LDAPDN(OctetString): | ||
tagSet: TagSet | ||
encoding: str | ||
|
||
class Password(_OctetString): | ||
tagSet: Any | ||
class Password(OctetString): | ||
tagSet: TagSet | ||
encoding: str | ||
|
||
class LDAPOID(_OctetString): | ||
tagSet: Any | ||
class LDAPOID(OctetString): | ||
tagSet: TagSet | ||
encoding: str | ||
|
||
class GroupCookie(_Integer): | ||
tagSet: Any | ||
class GroupCookie(Integer): | ||
tagSet: TagSet | ||
|
||
class NmasVer(_Integer): | ||
tagSet: Any | ||
class NmasVer(Integer): | ||
tagSet: TagSet | ||
|
||
class Error(_Integer): | ||
tagSet: Any | ||
class Error(Integer): | ||
tagSet: TagSet | ||
|
||
class NmasGetUniversalPasswordRequestValue(_Sequence): | ||
componentType: Any | ||
class NmasGetUniversalPasswordRequestValue(Sequence): | ||
componentType: NamedTypes | ||
|
||
class NmasGetUniversalPasswordResponseValue(_Sequence): | ||
componentType: Any | ||
class NmasGetUniversalPasswordResponseValue(Sequence): | ||
componentType: NamedTypes | ||
|
||
class NmasSetUniversalPasswordRequestValue(_Sequence): | ||
componentType: Any | ||
class NmasSetUniversalPasswordRequestValue(Sequence): | ||
componentType: NamedTypes | ||
|
||
class NmasSetUniversalPasswordResponseValue(_Sequence): | ||
componentType: Any | ||
class NmasSetUniversalPasswordResponseValue(Sequence): | ||
componentType: NamedTypes | ||
|
||
class ReplicaList(_SequenceOf): | ||
componentType: Any | ||
class ReplicaList(SequenceOf): | ||
componentType: NamedTypes | ||
|
||
class ReplicaInfoRequestValue(_Sequence): | ||
tagSet: Any | ||
componentType: Any | ||
class ReplicaInfoRequestValue(Sequence): | ||
tagSet: TagSet | ||
componentType: NamedTypes | ||
|
||
class ReplicaInfoResponseValue(_Sequence): | ||
tagSet: Any | ||
componentType: Any | ||
class ReplicaInfoResponseValue(Sequence): | ||
tagSet: TagSet | ||
componentType: NamedTypes | ||
|
||
class CreateGroupTypeRequestValue(_Sequence): | ||
componentType: Any | ||
class CreateGroupTypeRequestValue(Sequence): | ||
componentType: NamedTypes | ||
|
||
class CreateGroupTypeResponseValue(_Sequence): | ||
componentType: Any | ||
class CreateGroupTypeResponseValue(Sequence): | ||
componentType: NamedTypes | ||
|
||
class EndGroupTypeRequestValue(_Sequence): | ||
componentType: Any | ||
class EndGroupTypeRequestValue(Sequence): | ||
componentType: NamedTypes | ||
|
||
class EndGroupTypeResponseValue(_Sequence): | ||
componentType: Any | ||
class EndGroupTypeResponseValue(Sequence): | ||
componentType: NamedTypes | ||
|
||
class GroupingControlValue(_Sequence): | ||
componentType: Any | ||
class GroupingControlValue(Sequence): | ||
componentType: NamedTypes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
from typing import Any | ||
from typing_extensions import TypeAlias | ||
from pyasn1.type.namedtype import NamedTypes | ||
from pyasn1.type.namedval import NamedValues | ||
from pyasn1.type.univ import Enumerated, Sequence | ||
|
||
# Enable when pyasn1 gets stubs: | ||
# from pyasn1.type.univ import Enumerated, Sequence | ||
_Enumerated: TypeAlias = Any | ||
_Sequence: TypeAlias = Any | ||
class PersistentSearchControl(Sequence): | ||
componentType: NamedTypes | ||
|
||
class PersistentSearchControl(_Sequence): | ||
componentType: Any | ||
class ChangeType(Enumerated): | ||
namedValues: NamedValues | ||
|
||
class ChangeType(_Enumerated): | ||
namedValues: Any | ||
|
||
class EntryChangeNotificationControl(_Sequence): | ||
componentType: Any | ||
class EntryChangeNotificationControl(Sequence): | ||
componentType: NamedTypes | ||
|
||
def persistent_search_control(change_types, changes_only: bool = ..., return_ecs: bool = ..., criticality: bool = ...): ... |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.