mirror of
https://github.com/paralus/paralus.git
synced 2026-03-05 02:20:18 +00:00
Add OIDC provider db model
This commit is contained in:
32
components/usermgmt/pkg/internal/models/oidc_provider.go
Normal file
32
components/usermgmt/pkg/internal/models/oidc_provider.go
Normal file
@@ -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"`
|
||||
}
|
||||
Reference in New Issue
Block a user