simple_openid_connect.integrations.djangorestframework.permissions

DRF permission classes

See the DRF documentation on Setting the permission policy on how to use the classes contained here.

Classes

HasSessionScope()

Check whether an authenticated user has a session with the required scope

HasTokenScope()

Check whether an authenticated user has a token with the required scope

class simple_openid_connect.integrations.djangorestframework.permissions.HasSessionScope[source]

Check whether an authenticated user has a session with the required scope

has_permission(request: HttpRequest, view: Any) bool[source]

Return True if permission is granted, False otherwise.

class simple_openid_connect.integrations.djangorestframework.permissions.HasTokenScope[source]

Check whether an authenticated user has a token with the required scope

has_permission(request: HttpRequest, view: Any) bool[source]

Return True if permission is granted, False otherwise.