You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CampusRequest requires CLIENT_ID/CLIENT_SECRET even in device mode #35
When using Campus with mode="device", the CampusRequest class still requires CLIENT_ID and CLIENT_SECRET environment variables, even though device mode is designed for public clients (like CLI tools) that use Bearer token authentication instead.
Root Cause
In campus_python/json_client/__init__.py, the CampusRequest.__init__() method always calls reset_authorization() which requires:
CLIENT_ID environment variable
CLIENT_SECRET environment variable
This happens BEFORE the caller can set Bearer authorization via set_bearer_authorization().
Expected Behavior
Device mode should:
NOT require CLIENT_ID/CLIENT_SECRET environment variables
Allow Bearer token authentication to be set via set_bearer_authorization()
Only call reset_authorization() when mode="server"
In device mode, don't set any default authorization (Bearer will be set later)
Pass self._mode from Campus class to CampusRequest instances
Impact
This affects the campus-cli tool which uses device mode for user authentication via OAuth device flow.
Note: This issue has been fixed in PR #34. This issue is being migrated from the incorrect repository (campus-devcontainer-flask) to the correct one (campus-api-python).
Activity