flask_oidc.model module

class flask_oidc.model.User(ext: OpenIDConnect)[source]

Bases: object

A representation of an OIDC-based user.

Parameters:

ext (OpenIDConnect) – the extension instance

property access_token: str | None

The user’s OIDC access token.

property email: str | None

The user’s email.

property groups: list[str]

The list of group names the user belongs to.

property logged_in: bool

Return True if the user is logged in, False otherwise.

property name: str | None

The user’s nickname.

property profile: dict[str, Any]

The user’s OIDC profile, if any.

Raises:

RuntimeError – when OIDC_USER_INFO_ENABLED is False in the application’s configuration.

property refresh_token: str | None

The user’s OIDC refresh token.

property unique_id: str | None

The unique and immutable identifier on the Issuer side