diff options
| author | Guillermo Serrahima <dev@vylion.com> | 2026-04-07 08:36:13 +0200 |
|---|---|---|
| committer | Guillermo Serrahima <dev@vylion.com> | 2026-04-07 08:46:41 +0200 |
| commit | 1a31555761bb5180ed496d61511f6a36d791cb78 (patch) | |
| tree | cc14aa03002734feb9e6c59a3ee02ab652b1764d /backend/auth | |
| parent | 2bd2e1fd4fcf147ff4bb229226d879b6b6b5fa78 (diff) | |
| download | llostre-1a31555761bb5180ed496d61511f6a36d791cb78.tar.xz llostre-1a31555761bb5180ed496d61511f6a36d791cb78.zip | |
reworked cache with redis + improved fetching
Diffstat (limited to 'backend/auth')
| -rw-r--r-- | backend/auth/oauth.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/auth/oauth.go b/backend/auth/oauth.go index 9be1da0..a1b0419 100644 --- a/backend/auth/oauth.go +++ b/backend/auth/oauth.go @@ -44,6 +44,18 @@ type TokenResponse struct { ExpiresIn int `json:"expires_in"` } +func (s *OAuthState) Copy() *OAuthState { + return &OAuthState{ + State: s.State, + DID: s.DID, + PDS: s.PDS, + AccessToken: s.AccessToken, + RefreshToken: s.RefreshToken, + ExpiresAt: s.ExpiresAt, + KeyPair: s.KeyPair, + } +} + func GenerateRandomToken() (string, error) { b := make([]byte, 32) _, err := rand.Read(b) |
