-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stubs for python3-saml to fix mypy errors (#65)
- Use stubgen to generate stubs for onelogin.saml2.auth and onelogin.saml2.settings and fix imports - Add `stubs` directory to `mypy_path`
- Loading branch information
Showing
5 changed files
with
40 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from onelogin.saml2.settings import OneLogin_Saml2_Settings | ||
|
||
class OneLogin_Saml2_Auth: | ||
def __init__( | ||
self, | ||
request_data: dict[str, object], | ||
old_settings: OneLogin_Saml2_Settings | dict[str, object] | None = ..., | ||
custom_base_path: str | None = ..., | ||
) -> None: ... | ||
def process_response(self, request_id: str | None = None) -> None: ... | ||
def is_authenticated(self) -> bool: ... | ||
def get_friendlyname_attributes(self) -> dict[str, list[str]]: ... | ||
def get_errors(self) -> list[str]: ... | ||
def get_last_error_reason(self) -> str | None: ... | ||
def get_friendlyname_attribute(self, friendlyname: str) -> list[str]: ... | ||
def login( | ||
self, | ||
return_to: str | None = ..., | ||
force_authn: bool = ..., | ||
is_passive: bool = ..., | ||
set_nameid_policy: bool = ..., | ||
name_id_value_req: str | None = ..., | ||
) -> str: ... |
This file contains 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class OneLogin_Saml2_Settings: | ||
def __init__( | ||
self, | ||
settings: dict[str, object] | None = None, | ||
custom_base_path: str | None = None, | ||
sp_validation_only: bool | None = None, | ||
) -> None: ... | ||
def get_sp_metadata(self) -> bytes | str: ... | ||
def validate_metadata(self, xml: bytes | str) -> list[str]: ... |
This file contains 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