repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

pico / auth / __snapshots__
Antonio Mika · 22 Nov 24

api_test.snap

  1
  2[TestPaymentWebhook - 1]
  3successfully added pico+ user
  4---
  5
  6[TestAuthApi/authorize - 1]
  7<!doctype html>
  8<html lang="en">
  9  <head>
 10    <meta charset='utf-8'>
 11    <meta name="viewport" content="width=device-width, initial-scale=1" />
 12    <title>auth redirect</title>
 13
 14    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
 15
 16    <meta name="keywords" content="static, site, hosting" />
 17
 18    <link rel="stylesheet" href="/main.css" />
 19
 20    
 21  </head>
 22  <body >
 23<header>
 24    <h1 class="text-2xl">Auth Redirect</h1>
 25    <hr />
 26</header>
 27<main>
 28    <section>
 29        <h2 class="text-xl">You are being redirected to pico.test</h2>
 30        <p>
 31            Here is their auth request data:
 32        </p>
 33
 34        <article>
 35            <h2 class="text-lg">Client ID</h2>
 36            <div>333</div>
 37        </article>
 38
 39        <br />
 40
 41        <article>
 42            <h2 class="text-lg">Redirect URI</h2>
 43            <div>pico.test</div>
 44        </article>
 45
 46        <br />
 47
 48        <article>
 49            <h2 class="text-lg">Scope</h2>
 50            <div>admin</div>
 51        </article>
 52
 53        <br />
 54
 55        <article>
 56            <h2 class="text-lg">Response Type</h2>
 57            <div>json</div>
 58        </article>
 59
 60        <br />
 61
 62        <article>
 63            <h2 class="text-lg">If you would like to continue authenticating with this service, ssh into a pico service and generate a token. Then input it here and click submit.</h2>
 64            <br />
 65            <form action="/redirect" method="POST">
 66                <label for="token">Auth Token:</label><br>
 67                <input type="text" id="token" name="token"><br>
 68                <br />
 69                <input type="hidden" id="redirect_uri" name="redirect_uri" value="pico.test">
 70                <input type="hidden" id="response_type" name="response_type" value="json">
 71                <input type="submit" value="Submit">
 72            </form>
 73        </article>
 74    </section>
 75</main>
 76
 77<footer>
 78  <hr />
 79  <p class="font-italic">Built and maintained by <a href="https://pico.sh">pico.sh</a>.</p>
 80  <div>
 81    <a href="https://github.com/picosh/pico">source</a>
 82  </div>
 83</footer>
 84
 85</body>
 86</html>
 87---
 88
 89[TestUser - 1]
 90[{"id":"1","user_id":"user-1","name":"my-key","key":"nice-pubkey","created_at":"0001-01-01T00:00:00Z"}]
 91---
 92
 93[TestAuthApi/rss - 1]
 94<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom">
 95  <title>pico+</title>
 96  <id>https://auth.pico.sh/rss/123</id>
 97  <updated></updated>
 98  <subtitle>get notified of important membership updates</subtitle>
 99  <link href="https://auth.pico.sh/rss/123"></link>
100  <author>
101    <name>team pico</name>
102  </author>
103  <entry>
104    <title>pico+ membership activated on 2021-08-15 14:30:45</title>
105    <updated>2021-08-15T14:30:45Z</updated>
106    <id>pico-plus-activated-1629037845</id>
107    <content type="html">Thanks for joining pico+! You now have access to all our premium services for exactly one year.  We will send you pico+ expiration notifications through this RSS feed.  Go to &lt;a href=&#34;https://pico.sh/getting-started#next-steps&#34;&gt;pico.sh/getting-started#next-steps&lt;/a&gt; to start using our services.</content>
108    <link href="https://pico.sh" rel="alternate"></link>
109    <summary type="html">Thanks for joining pico+! You now have access to all our premium services for exactly one year.  We will send you pico+ expiration notifications through this RSS feed.  Go to &lt;a href=&#34;https://pico.sh/getting-started#next-steps&#34;&gt;pico.sh/getting-started#next-steps&lt;/a&gt; to start using our services.</summary>
110    <author>
111      <name>team pico</name>
112    </author>
113  </entry>
114  <entry>
115    <title>pico+ 1-month expiration notice</title>
116    <updated>2021-07-16T14:30:45Z</updated>
117    <id>1626445845</id>
118    <content type="html">Your pico+ membership is going to expire on 2021-08-16 14:30:45</content>
119    <link href="https://pico.sh" rel="alternate"></link>
120    <summary type="html">Your pico+ membership is going to expire on 2021-08-16 14:30:45</summary>
121    <author>
122      <name>team pico</name>
123    </author>
124  </entry>
125  <entry>
126    <title>pico+ 1-week expiration notice</title>
127    <updated>2021-08-09T14:30:45Z</updated>
128    <id>1628519445</id>
129    <content type="html">Your pico+ membership is going to expire on 2021-08-16 14:30:45</content>
130    <link href="https://pico.sh" rel="alternate"></link>
131    <summary type="html">Your pico+ membership is going to expire on 2021-08-16 14:30:45</summary>
132    <author>
133      <name>team pico</name>
134    </author>
135  </entry>
136  <entry>
137    <title>pico+ 1-day expiration notice</title>
138    <updated>2021-08-14T14:30:45Z</updated>
139    <id>1628951445</id>
140    <content type="html">Your pico+ membership is going to expire on 2021-08-16 14:30:45</content>
141    <link href="https://pico.sh" rel="alternate"></link>
142    <summary type="html">Your pico+ membership is going to expire on 2021-08-16 14:30:45</summary>
143    <author>
144      <name>team pico</name>
145    </author>
146  </entry>
147</feed>
148---
149
150[TestKey - 1]
151{"id":"user-1","name":"user-a","created_at":null}
152---
153
154[TestAuthApi/fileserver - 1]
155User-agent: *
156Allow: /
157---
158
159[TestAuthApi/well-known - 1]
160{"issuer":"auth.pico.test","introspection_endpoint":"http://0.0.0.0:3000/introspect","introspection_endpoint_auth_methods_supported":["none"],"authorization_endpoint":"http://0.0.0.0:3000/authorize","token_endpoint":"http://0.0.0.0:3000/token","response_types_supported":["code"]}
161---
162
163[TestIntrospect - 1]
164{"active":true,"username":"user-a"}
165---
166
167[TestToken - 1]
168{"access_token":"123"}
169---