[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/url-http-oauth-demo d5ebb7e14f 01/13: url-http-oauth-de
From: |
Thomas Fitzsimmons |
Subject: |
[elpa] externals/url-http-oauth-demo d5ebb7e14f 01/13: url-http-oauth-demo.el: New package |
Date: |
Mon, 8 May 2023 21:25:11 -0400 (EDT) |
branch: externals/url-http-oauth-demo
commit d5ebb7e14f6ed4a02f02c99db23780026e7b7beb
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Commit: Thomas Fitzsimmons <fitzsim@fitzsim.org>
url-http-oauth-demo.el: New package
* url-http-oauth-demo.el: New file.
* .gitignore: Likewise.
---
.gitignore | 3 +++
url-http-oauth-demo.el | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000..fa7b465de0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/url-http-oauth-demo-pkg.el
+/url-http-oauth-demo-autoloads.el
+*.elc
diff --git a/url-http-oauth-demo.el b/url-http-oauth-demo.el
new file mode 100644
index 0000000000..902475f37a
--- /dev/null
+++ b/url-http-oauth-demo.el
@@ -0,0 +1,50 @@
+;;; url-http-oauth-demo.el --- Demo url-http-oauth -*- lexical-binding: t -*-
+
+;; Copyright (C) 2023 Free Software Foundation, Inc.
+
+;; Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
+;; Version: 0
+;; Keywords: comm, data, processes, hypermedia
+;; Package-Requires: ((url-http-oauth "0"))
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; This package demonstrates an OAuth 2.0 flow for Sourcehut using the
+;; built-in GNU Emacs URL library and the GNU ELPA url-http-oauth
+;; package.
+;;
+;; Installation:
+;;
+;; M-x package-install RET url-http-oauth-demo RET
+
+;;; Code:
+(require 'url-http-oauth)
+
+;;; Register "https://meta.sr.ht/query" as needing OAuth 2.0 for
+;;; authentication.
+;;;###autoload
+(url-http-oauth-register-provider "https://meta.sr.ht/query"
+ "https://meta.sr.ht/oauth2/authorize"
+ "https://meta.sr.ht/oauth2/access-token"
+ "107ba4a9-2a96-4420-8818-84ec1f112405"
+ "meta.sr.ht/PROFILE:RO")
+
+;; FIXME: Make an authenticated API call using "meta.sr.ht/PROFILE:RO"
+;; to prove the OAuth 2.0 procedure was successful.
+
+(provide 'url-http-oauth-demo)
+
+;;; url-http-oauth-demo.el ends here
- [elpa] branch externals/url-http-oauth-demo created (now ee91889a8e), Thomas Fitzsimmons, 2023/05/08
- [elpa] externals/url-http-oauth-demo 828ef46e55 05/13: Add background documentation, Thomas Fitzsimmons, 2023/05/08
- [elpa] externals/url-http-oauth-demo 8ea929c685 10/13: Update config format and Emacs 26 support, Thomas Fitzsimmons, 2023/05/08
- [elpa] externals/url-http-oauth-demo d14fc3e005 07/13: Update url-http-oauth-interpose call, Thomas Fitzsimmons, 2023/05/08
- [elpa] externals/url-http-oauth-demo d45c47de23 03/13: Make get-profile-name function synchronous, Thomas Fitzsimmons, 2023/05/08
- [elpa] externals/url-http-oauth-demo a2b9116412 11/13: Use updated settings format, Thomas Fitzsimmons, 2023/05/08
- [elpa] externals/url-http-oauth-demo f2d8a1a4bb 02/13: url-http-oauth-demo-get-profile-name is working, Thomas Fitzsimmons, 2023/05/08
- [elpa] externals/url-http-oauth-demo 8ba62b2072 08/13: Update a comment, Thomas Fitzsimmons, 2023/05/08
- [elpa] externals/url-http-oauth-demo de81100f6e 04/13: Finish confidential client demonstration, Thomas Fitzsimmons, 2023/05/08
- [elpa] externals/url-http-oauth-demo bcbea4d8ef 06/13: Change scope handling, Thomas Fitzsimmons, 2023/05/08
- [elpa] externals/url-http-oauth-demo d5ebb7e14f 01/13: url-http-oauth-demo.el: New package,
Thomas Fitzsimmons <=
- [elpa] externals/url-http-oauth-demo ee91889a8e 13/13: Bump version to 1.0.0, Thomas Fitzsimmons, 2023/05/08
- [elpa] externals/url-http-oauth-demo 68dd6973b2 12/13: Update comments, Thomas Fitzsimmons, 2023/05/08
- [elpa] externals/url-http-oauth-demo aa62f012d0 09/13: Fix URL retrieval, Thomas Fitzsimmons, 2023/05/08