Skip to content

Commit

Permalink
feat: identities service implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
shipperizer committed Aug 21, 2024
1 parent 3982bd2 commit e7d5d47
Show file tree
Hide file tree
Showing 3 changed files with 3,188 additions and 10 deletions.
14 changes: 14 additions & 0 deletions pkg/identities/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"context"

kClient "github.com/ory/kratos-client-go"

ofga "github.com/canonical/identity-platform-admin-ui/internal/openfga"
)

type AuthorizerInterface interface {
Expand All @@ -21,3 +23,15 @@ type ServiceInterface interface {
UpdateIdentity(context.Context, string, *kClient.UpdateIdentityBody) (*IdentityData, error)
DeleteIdentity(context.Context, string) (*IdentityData, error)
}

type OpenFGAStoreInterface interface {
ListAssignedRoles(context.Context, string) ([]string, error)
ListAssignedGroups(context.Context, string) ([]string, error)
AssignRoles(context.Context, string, ...string) error
UnassignRoles(context.Context, string, ...string) error
AssignGroups(context.Context, string, ...string) error
UnassignGroups(context.Context, string, ...string) error
ListPermissions(context.Context, string, map[string]string) ([]ofga.Permission, map[string]string, error)
AssignPermissions(context.Context, string, ...ofga.Permission) error
UnassignPermissions(context.Context, string, ...ofga.Permission) error
}
Loading

0 comments on commit e7d5d47

Please sign in to comment.