OIDCScope#

class gafaelfawr.models.oidc.OIDCScope(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: StrEnum

A recognized OpenID Connect scope.

This should not be directly exposed in the model of any endpoint. Instead, the str scope parameter should be parsed with the parse_scopes class method to yield a list of OIDCScope objects.

Attributes Summary

Methods Summary

parse_scopes(scopes)

Parse a space-separated list of scopes.

Attributes Documentation

email = 'email'#
openid = 'openid'#
profile = 'profile'#
rubin = 'rubin'#

Methods Documentation

classmethod parse_scopes(scopes)#

Parse a space-separated list of scopes.

Any unknown scopes are silently ignored, following the OpenID Connect Core specification.

Parameters:

scopes (str) – Space-separated list of scopes.

Returns:

Corresponding enums of recognized scopes.

Return type:

list of OIDCScope