forked from tangled.org/core
this repo has no description
at master 494 B view raw
1package client 2 3import ( 4 oauth "tangled.sh/icyphox.sh/atproto-oauth" 5 "tangled.sh/icyphox.sh/atproto-oauth/helpers" 6) 7 8type OAuthClient struct { 9 *oauth.Client 10} 11 12func NewClient(clientId, clientJwk, redirectUri string) (*OAuthClient, error) { 13 k, err := helpers.ParseJWKFromBytes([]byte(clientJwk)) 14 if err != nil { 15 return nil, err 16 } 17 18 cli, err := oauth.NewClient(oauth.ClientArgs{ 19 ClientId: clientId, 20 ClientJwk: k, 21 RedirectUri: redirectUri, 22 }) 23 return &OAuthClient{cli}, err 24}