providers/* use name for __str__

This commit is contained in:
Jens Langhammer 2020-07-05 23:00:40 +02:00
parent 26613b6ea9
commit 2402cfe29d
4 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@ class ApplicationGatewayProvider(Provider):
)
def __str__(self):
return f"Application Gateway {self.name}"
return self.name
class Meta:

View File

@ -19,7 +19,7 @@ class OAuth2Provider(Provider, AbstractApplication):
form = "passbook.providers.oauth.forms.OAuth2ProviderForm"
def __str__(self):
return f"OAuth2 Provider {self.name}"
return self.name
def html_setup_urls(self, request: HttpRequest) -> Optional[str]:
"""return template and context modal with URLs for authorize, token, openid-config, etc"""

View File

@ -28,7 +28,7 @@ class OpenIDProvider(Provider):
return self.oidc_client.name
def __str__(self):
return f"OpenID Connect Provider {self.oidc_client.__str__()}"
return self.oidc_client.__str__()
def html_setup_urls(self, request: HttpRequest) -> Optional[str]:
"""return template and context modal with URLs for authorize, token, openid-config, etc"""

View File

@ -123,7 +123,7 @@ class SAMLProvider(Provider):
return self._processor
def __str__(self):
return f"SAML Provider {self.name}"
return self.name
def link_download_metadata(self):
"""Get link to download XML metadata for admin interface"""