mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-08 04:20:59 -05:00
fad94d2038
* bump mockery, add test stub for oidc_auth.go Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * use .mockery.yaml for all mocks Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * drop legacy go:generate mockery Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * align mock placement Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> --------- Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
19 lines
964 B
Go
19 lines
964 B
Go
package keycloak
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/Nerzal/gocloak/v13"
|
|
)
|
|
|
|
// GoCloak represents the parts of gocloak.GoCloak that we use, mainly here for mockery.
|
|
type GoCloak interface {
|
|
CreateUser(ctx context.Context, token, realm string, user gocloak.User) (string, error)
|
|
GetUsers(ctx context.Context, token, realm string, params gocloak.GetUsersParams) ([]*gocloak.User, error)
|
|
ExecuteActionsEmail(ctx context.Context, token, realm string, params gocloak.ExecuteActionsEmail) error
|
|
LoginClient(ctx context.Context, clientID, clientSecret, realm string, scopes ...string) (*gocloak.JWT, error)
|
|
RetrospectToken(ctx context.Context, accessToken, clientID, clientSecret, realm string) (*gocloak.IntroSpectTokenResult, error)
|
|
GetCredentials(ctx context.Context, accessToken, realm, userID string) ([]*gocloak.CredentialRepresentation, error)
|
|
GetUserSessions(ctx context.Context, token, realm, userID string) ([]*gocloak.UserSessionRepresentation, error)
|
|
}
|