+7
-7
README.md
+7
-7
README.md
············You'll need to create a private DPoP JWK for the user before directing them to their PDS to authenticate. You'll need to store this in a later step, and you will need to pass it along inside the PAR request, so go ahead and marshal it as well.···-u.RawQuery = fmt.Sprintf("client_id=%s&requires_uri=%s", url.QueryEscape(yourClientId), parResp.RequestUri)+u.RawQuery = fmt.Sprintf("client_id=%s&request_uri=%s", url.QueryEscape(yourClientId), parResp.RequestUri)···
+2
-2
cmd/helper/main.go
+2
-2
cmd/helper/main.go
······
cmd/web_server_demo/client_test
cmd/web_server_demo/client_test
This is a binary file and will not be displayed.
+22
-13
cmd/web_server_demo/handle_auth.go
+22
-13
cmd/web_server_demo/handle_auth.go
·········-u.RawQuery = fmt.Sprintf("client_id=%s&request_uri=%s", url.QueryEscape(serverMetadataUrl), parResp.RequestUri)············-initialTokenResp, err := s.oauthClient.InitialTokenRequest(e.Request().Context(), resCode, resIss, oauthRequest.PkceVerifier, oauthRequest.DpopAuthserverNonce, jwk)+initialTokenResp, err := s.oauthClient.InitialTokenRequest(e.Request().Context(), code, iss, oauthRequest.PkceVerifier, oauthRequest.DpopAuthserverNonce, jwk)···
+1
-1
cmd/web_server_demo/handle_post.go
+1
-1
cmd/web_server_demo/handle_post.go
+74
-42
cmd/web_server_demo/main.go
+74
-42
cmd/web_server_demo/main.go
·········-func (t *TemplateRenderer) Render(w io.Writer, name string, data interface{}, c echo.Context) error {························
+3
-2
cmd/web_server_demo/user.go
+3
-2
cmd/web_server_demo/user.go
·········
-113
generic.go
-113
generic.go
···
+2
-2
go.mod
+2
-2
go.mod
···
+4
-4
go.sum
+4
-4
go.sum
···-github.com/bluesky-social/indigo v0.0.0-20250301025210-a4e0cc37e188 h1:1sQaG37xk08/rpmdhrmMkfQWF9kZbnfHm9Zav3bbSMk=-github.com/bluesky-social/indigo v0.0.0-20250301025210-a4e0cc37e188/go.mod h1:NVBwZvbBSa93kfyweAmKwOLYawdVHdwZ9s+GZtBBVLA=+github.com/bluesky-social/indigo v0.0.0-20250616202859-d4516ea1d6cf h1:LFlwtY9r95lAI1yYKolCLTQnwK5VjgWO87mNsKdj3Qs=+github.com/bluesky-social/indigo v0.0.0-20250616202859-d4516ea1d6cf/go.mod h1:8FlFpF5cIq3DQG0kEHqyTkPV/5MDQoaWLcVwza5ZPJU=github.com/carlmjohnson/versioninfo v0.22.5/go.mod h1:QT9mph3wcVfISUKd0i9sZfVrPviHuSF+cUtLjm2WSf8=github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=···
+94
helpers/generic.go
+94
helpers/generic.go
···
+24
internal/helpers/generic.go
+24
internal/helpers/generic.go
···
+25
-20
oauth.go
+25
-20
oauth.go
···············func (c *Client) FetchAuthServerMetadata(ctx context.Context, ustr string) (*OauthAuthorizationMetadata, error) {···return nil, fmt.Errorf("received non-200 response from pds. status code was %d", resp.StatusCode)···-func (c *Client) SendParAuthRequest(ctx context.Context, authServerUrl string, authServerMeta *OauthAuthorizationMetadata, loginHint, scope string, dpopPrivateKey jwk.Key) (*SendParAuthResponse, error) {+func (c *Client) SendParAuthRequest(ctx context.Context, authServerUrl string, authServerMeta *OauthAuthorizationMetadata, loginHint, scope string, dpopPrivateKey jwk.Key, extras ...ParAuthRequestExtra) (*SendParAuthResponse, error) {···
+4
-3
oauth_test.go
+4
-3
oauth_test.go
············
-27
types.go
-27
types.go
·········
+4
-3
xrpc.go
+4
-3
xrpc.go
·········-func (c *XrpcClient) Do(ctx context.Context, authedArgs *XrpcAuthedRequestArgs, kind xrpc.XRPCRequestType, inpenc, method string, params map[string]any, bodyobj any, out any) error {+func (c *XrpcClient) Do(ctx context.Context, authedArgs *XrpcAuthedRequestArgs, kind string, inpenc, method string, params map[string]any, bodyobj any, out any) error {···