Glacier2.PermissionsVerifierPrx

class Glacier2.PermissionsVerifierPrx

Bases: ObjectPrx

Represents an object that checks user permissions. The Glacier2 router and other services use a Glacier2.PermissionsVerifierPrx proxy when the user is authenticated using a user ID and password.

Notes

The Slice compiler generated this proxy class from Slice interface ::Glacier2::PermissionsVerifier.

checkPermissions(userId: str, password: str, context: dict[str, str] | None = None) tuple[bool, str]

Checks if a user is authorized to establish a session.

Parameters:
  • userId (str) – The user ID.

  • password (str) – The user’s password.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

A tuple containing:
  • bool true if access is granted, false otherwise.

  • str The reason why access was denied.

Return type:

tuple[bool, str]

Raises:

PermissionDeniedException – Thrown when the user’s access is denied. This exception can be thrown instead of returning false with a reason set in the reason out parameter.

checkPermissionsAsync(userId: str, password: str, context: dict[str, str] | None = None) Awaitable[tuple[bool, str]]

Checks if a user is authorized to establish a session.

Parameters:
  • userId (str) – The user ID.

  • password (str) – The user’s password.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

A tuple containing:
  • bool true if access is granted, false otherwise.

  • str The reason why access was denied.

Return type:

Awaitable[tuple[bool, str]]

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) PermissionsVerifierPrx | None

Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[PermissionsVerifierPrx | None]

Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static ice_staticId() str

Gets the Slice type ID of the interface associated with this proxy.

Returns:

The type ID, “::Ice::Object”.

Return type:

str

static uncheckedCast(proxy: ObjectPrx, facet: str | None = None) PermissionsVerifierPrx
static uncheckedCast(proxy: None, facet: str | None = None) None

Creates a new proxy from an existing proxy.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

Returns:

A new proxy with the requested type, or None if the source proxy is None.

Return type:

ObjectPrx | None