diff --git a/components/usermgmt/pkg/internal/models/oidc_provider.go b/components/usermgmt/pkg/internal/models/oidc_provider.go new file mode 100644 index 0000000..1d028c7 --- /dev/null +++ b/components/usermgmt/pkg/internal/models/oidc_provider.go @@ -0,0 +1,32 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type OIDCProvider struct { + bun.BaseModel `bun:"table:authsrv_oidc_provider,alias:oidcprovider"` + + Id uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull,unique"` + Description string `bun:"description"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + + ProviderName string `bun:"provider_name,notnull"` + MapperURL string `bun:"mapper_url"` + MapperFilename string `bun:"mapper_filename"` + ClientId string `bun:"client_id,notnull"` + ClientSecret string `bun:"client_secret,notnull"` + Scopes []string `bun:"scopes,notnull"` + IssuerURL string `bun:"issuer_url,notnull"` + AuthURL string `bun:"auth_url"` + TokenURL string `bun:"token_url"` + RequestedClaims map[string]interface{} `bun:"type:jsonb"` + Predefined bool `bun:"predefined,notnull"` + CallbackURL string `bun:"callback_url,notnull"` + Trash bool `bun:"trash,default:false"` +}