Skip to content

Commit

Permalink
root: remove warnings (goauthentik#10774)
Browse files Browse the repository at this point in the history
* remove facebook sdk

Signed-off-by: Jens Langhammer <[email protected]>

* switch to newer opencontainers fork

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
# Conflicts:
#	poetry.lock
  • Loading branch information
BeryJu committed Aug 5, 2024
1 parent 5314485 commit b4f0488
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 34 deletions.
13 changes: 0 additions & 13 deletions authentik/sources/oauth/types/facebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

from typing import Any

from facebook import GraphAPI

from authentik.sources.oauth.clients.oauth2 import OAuth2Client
from authentik.sources.oauth.types.registry import SourceType, registry
from authentik.sources.oauth.views.callback import OAuthCallback
from authentik.sources.oauth.views.redirect import OAuthRedirect
Expand All @@ -19,19 +16,9 @@ def get_additional_parameters(self, source): # pragma: no cover
}


class FacebookOAuth2Client(OAuth2Client):
"""Facebook OAuth2 Client"""

def get_profile_info(self, token: dict[str, str]) -> dict[str, Any] | None:
api = GraphAPI(access_token=token["access_token"])
return api.get_object("me", fields="id,name,email")


class FacebookOAuth2Callback(OAuthCallback):
"""Facebook OAuth2 Callback"""

client_class = FacebookOAuth2Client

def get_user_enroll_context(
self,
info: dict[str, Any],
Expand Down
29 changes: 10 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ docker = "*"
drf-spectacular = "*"
dumb-init = "*"
duo-client = "*"
facebook-sdk = "*"
fido2 = "*"
flower = "*"
geoip2 = "*"
Expand All @@ -121,7 +120,7 @@ kubernetes = "*"
ldap3 = "*"
lxml = "*"
msgraph-sdk = "*"
opencontainers = { extras = ["reggie"], version = "*" }
opencontainers = { git = "https://github.com/BeryJu/oci-python", rev = "3c5e4dbeaea744fd52515c3daba0e28741cb2091", extras = ["reggie"] }
packaging = "*"
paramiko = "*"
psycopg = { extras = ["c"], version = "*" }
Expand Down

0 comments on commit b4f0488

Please sign in to comment.