keycloak.authorization.role#

The authorization Role module.

Classes#

Role

Authorization Role base class.

Module Contents#

class keycloak.authorization.role.Role(name: str, required: bool = False)[source]#

Authorization Role base class.

Roles identify a type or category of user. Admin, user, manager, and employee are all typical roles that may exist in an organization.

https://keycloak.gitbooks.io/documentation/server_admin/topics/roles.html

Parameters:
  • name (str) – Name

  • required (bool) – Required role indicator

name[source]#
required = False[source]#
get_name() str[source]#

Get name.

Returns:

Name

Return type:

str

__eq__(other: object) bool[source]#

Eq method.

Parameters:

other (str) – The other object

Returns:

Equality bool

Return type:

bool

__hash__() int[source]#

Hash method.

Returns:

Hash value

Return type:

int