{"result":{"depiction_url":null,"edges":{"observes":{"objects":[{"created":"2026-09-09T13:47:48Z","object_id":{"id":1442,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_request_context","title":"observe_request_context\/3","uri":"https:\/\/zotonic.com\/id\/1442"},"seq":1},{"created":"2026-09-09T13:47:48Z","object_id":{"id":1466,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_admin_menu","title":"observe_admin_menu\/3","uri":"https:\/\/zotonic.com\/id\/1466"},"seq":2},{"created":"2026-09-09T13:47:48Z","object_id":{"id":1982,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_search_query","title":"observe_search_query\/2","uri":"https:\/\/zotonic.com\/id\/1982"},"seq":3},{"created":"2026-09-09T13:47:48Z","object_id":{"id":2284,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_url_fetch_options","title":"observe_url_fetch_options\/2","uri":"https:\/\/zotonic.com\/id\/2284"},"seq":4}],"predicate":{"id":2550,"is_a":["meta","predicate"],"name":"observes","title":{"_type":"trans","tr":{"en":"Observes"}},"uri":"https:\/\/zotonic.com\/id\/observes"}},"subject":{"objects":[{"created":"2026-09-09T13:47:48Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:47:48Z","object_id":{"id":2565,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_integrator","title":"Integrator","uri":"https:\/\/zotonic.com\/id\/2565"},"seq":2},{"created":"2026-09-09T13:47:48Z","object_id":{"id":2590,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_authentication","title":"Authentication","uri":"https:\/\/zotonic.com\/id\/2590"},"seq":3},{"created":"2026-09-09T13:47:48Z","object_id":{"id":2592,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_authorization_and_access_control","title":"Authorization and access control","uri":"https:\/\/zotonic.com\/id\/2592"},"seq":4},{"created":"2026-09-09T13:47:48Z","object_id":{"id":2599,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_api_and_integration","title":"API and integration","uri":"https:\/\/zotonic.com\/id\/2599"},"seq":5},{"created":"2026-09-09T13:47:48Z","object_id":{"id":2635,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_module","title":"Module","uri":"https:\/\/zotonic.com\/id\/2635"},"seq":6},{"created":"2026-09-09T13:47:48Z","object_id":{"id":2681,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_oauth_2_0","title":"OAuth 2.0","uri":"https:\/\/zotonic.com\/id\/2681"},"seq":7}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1831,"is_a":["text","documentation","reference","module"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1831"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_module_mod_oauth2","page_url":{"en":"https:\/\/zotonic.com\/docs\/1831\/mod_oauth2","x-default":"https:\/\/zotonic.com\/docs\/1831\/mod_oauth2"},"preview_url":null,"resource":{"version":3328,"pivot_location_lat":null,"title":"mod_oauth2","is_authoritative":true,"body":"<p>OAuth2 provider module for app\/client\/token management and authorization flows.<\/p>\n<h2>Accepted Events<\/h2>\n<p>This module handles the following notifier callbacks:<\/p>\n<ul><li><code>observe_admin_menu<\/code>: Add OAuth2 administration entries to the admin menu.<\/li><li><code>observe_request_context<\/code>: Check if there is a valid Authorization header or &#39;access_token&#39; argument using <code>z_context:get<\/code>.<\/li><li><code>observe_search_query<\/code>: Queries to find OAuth2 tokens using <code>z_datetime:next_hour<\/code>.<\/li><li><code>observe_tick_24h<\/code>: Periodically delete expired server side tokens using <code>m_oauth2:delete_expired_tokens<\/code>.<\/li><li><code>observe_tick_3h<\/code>: Periodically try to extend tokens that are expiring in the next 8 hours using <code>z_datetime:next_hour<\/code>.<\/li><li><code>observe_url_fetch_options<\/code>: Check if the current user has a token for the given host using <code>z_acl:user<\/code>.<\/li><\/ul>\n<p>Delegate callbacks:<\/p>\n<ul><li><code>event\/2<\/code> with <code>postback<\/code> messages: <code>oauth2_app_delete<\/code>, <code>oauth2_app_token_delete<\/code>, <code>oauth2_app_token_generate<\/code>, <code>oauth2_consumer_delete<\/code>, <code>oauth2_consumer_token_delete<\/code>, <code>oauth2_fetch_consumer_token<\/code>.<\/li><li><code>event\/2<\/code> with <code>submit<\/code> messages: <code>oauth2_app_insert<\/code>, <code>oauth2_app_token_new<\/code>, <code>oauth2_app_update<\/code>, <code>oauth2_authorize<\/code>, <code>oauth2_consumer_insert<\/code>, <code>oauth2_consumer_token_new<\/code>, <code>oauth2_consumer_update<\/code>.<\/li><\/ul>","slug":"mod_oauth2","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"7841cb81c48b54664da1084c3a5be19392e6b68317c59c7ad80db1456e57496e","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":320,"is_a":["meta","category"],"name":"module","title":"Modules","uri":"https:\/\/test.zotonic.com\/id\/320"},"doc_source_path":"apps\/zotonic_mod_oauth2\/src\/mod_oauth2.erl","publication_start":"2023-01-30T19:24:00Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_oauth2\/src\/mod_oauth2.erl","pivot_location_lng":null,"doc_source_kind":"module","name":"doc_module_mod_oauth2","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:38Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_oauth2","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"66cb145eae7002b184e7d8c4c7bba5e53e8248e5\n","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-02T12:40:21Z","title_slug":"mod_oauth2"},"uri":"https:\/\/zotonic.com\/id\/1831","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1831"}},"status":"ok"}