MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / authorize

Method authorize

enterprise/storage/device_code.py:77–81  ·  view source on GitHub ↗

Mark the device code as authorized.

(self, user_id: str)

Source from the content-addressed store, hash-verified

75 return self.status == DeviceCodeStatus.AUTHORIZED.value
76
77 def authorize(self, user_id: str) -> None:
78 """Mark the device code as authorized."""
79 self.status = DeviceCodeStatus.AUTHORIZED.value
80 self.keycloak_user_id = user_id # Set the Keycloak user ID during authorization
81 self.authorized_at = datetime.now(timezone.utc)
82
83 def deny(self) -> None:
84 """Mark the device code as denied."""

Callers 3

authorize_device_codeMethod · 0.80
test_authorizeMethod · 0.80
__init__Method · 0.80

Calls 1

nowMethod · 0.80

Tested by 1

test_authorizeMethod · 0.64