mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-23 03:26:15 -06:00
[feature] Refactor tokens, allow multiple app redirect_uris
This commit is contained in:
parent
67a2b3650c
commit
3b1b842890
77 changed files with 860 additions and 554 deletions
|
|
@ -36,15 +36,6 @@ type Application interface {
|
|||
// DeleteApplicationByClientID deletes the application with corresponding client_id value from the database.
|
||||
DeleteApplicationByClientID(ctx context.Context, clientID string) error
|
||||
|
||||
// GetClientByID fetches the application client from database with ID.
|
||||
GetClientByID(ctx context.Context, id string) (*gtsmodel.Client, error)
|
||||
|
||||
// PutClient puts the given application client in the database.
|
||||
PutClient(ctx context.Context, client *gtsmodel.Client) error
|
||||
|
||||
// DeleteClientByID deletes the application client from database with ID.
|
||||
DeleteClientByID(ctx context.Context, id string) error
|
||||
|
||||
// GetAllTokens fetches all client oauth tokens from database.
|
||||
GetAllTokens(ctx context.Context) ([]*gtsmodel.Token, error)
|
||||
|
||||
|
|
@ -63,6 +54,9 @@ type Application interface {
|
|||
// PutToken puts given client oauth token in the database.
|
||||
PutToken(ctx context.Context, token *gtsmodel.Token) error
|
||||
|
||||
// UpdateToken updates the given token. Update all columns if no specific columns given.
|
||||
UpdateToken(ctx context.Context, token *gtsmodel.Token, columns ...string) error
|
||||
|
||||
// DeleteTokenByID deletes client oauth token from database with ID.
|
||||
DeleteTokenByID(ctx context.Context, id string) error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue