Mark the device code as authorized.
(self, user_id: str)
| 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.""" |