mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-07 23:07:26 +02:00
added OAuth2 displayName and pkce options
This commit is contained in:
1 parent
995733000f
commit
b283ee2263
65 files changed
+421
-226
No files matched your search
+14
-1
@@ -16,10 +16,10 @@ type AuthUser struct {
|
||||
Username string `json:"username"`
|
||||
Email string `json:"email"`
|
||||
AvatarUrl string `json:"avatarUrl"`
|
||||
RawUser map[string]any `json:"rawUser"`
|
||||
AccessToken string `json:"accessToken"`
|
||||
RefreshToken string `json:"refreshToken"`
|
||||
Expiry types.DateTime `json:"expiry"`
|
||||
RawUser map[string]any `json:"rawUser"`
|
||||
}
|
||||
|
||||
// Provider defines a common interface for an OAuth2 client.
|
||||
@@ -30,6 +30,19 @@ type Provider interface {
|
||||
// SetContext assigns the specified context to the current provider.
|
||||
SetContext(ctx context.Context)
|
||||
|
||||
// PKCE indicates whether the provider can use the PKCE flow.
|
||||
PKCE() bool
|
||||
|
||||
// SetPKCE toggles the state whether the provider can use the PKCE flow or not.
|
||||
SetPKCE(enable bool)
|
||||
|
||||
// DisplayName usually returns provider name as it is officially written
|
||||
// and it could be used directly in the UI.
|
||||
DisplayName() string
|
||||
|
||||
// SetDisplayName sets the provider's display name.
|
||||
SetDisplayName(displayName string)
|
||||
|
||||
// Scopes returns the provider access permissions that will be requested.
|
||||
Scopes() []string
|
||||
|
||||
|
||||
Reference in new issue
Block a user