-
Notifications
You must be signed in to change notification settings - Fork 8
/
storage.go
31 lines (25 loc) · 1.19 KB
/
storage.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package provider
import (
"context"
"github.com/zitadel/saml/pkg/provider/key"
"github.com/zitadel/saml/pkg/provider/models"
"github.com/zitadel/saml/pkg/provider/serviceprovider"
"github.com/zitadel/saml/pkg/provider/xml/samlp"
)
type EntityStorage interface {
GetCA(context.Context) (*key.CertificateAndKey, error)
GetMetadataSigningKey(context.Context) (*key.CertificateAndKey, error)
}
type IdentityProviderStorage interface {
GetEntityByID(ctx context.Context, entityID string) (*serviceprovider.ServiceProvider, error)
GetEntityIDByAppID(ctx context.Context, entityID string) (string, error)
GetResponseSigningKey(context.Context) (*key.CertificateAndKey, error)
}
type AuthStorage interface {
CreateAuthRequest(context.Context, *samlp.AuthnRequestType, string, string, string, string) (models.AuthRequestInt, error)
AuthRequestByID(context.Context, string) (models.AuthRequestInt, error)
}
type UserStorage interface {
SetUserinfoWithUserID(ctx context.Context, applicationID string, userinfo models.AttributeSetter, userID string, attributes []int) (err error)
SetUserinfoWithLoginName(ctx context.Context, userinfo models.AttributeSetter, loginName string, attributes []int) (err error)
}