syz/oauth/request.go

88 lines
2.6 KiB
Go

package oauth
import (
"time"
"github.com/google/uuid"
"github.com/zitadel/oidc/v3/pkg/oidc"
"gorm.io/gorm"
)
type AuthRequest struct {
ID uuid.UUID `gorm:"primary_key;type:char(36);default:(UUID());comment:id"`
ClientID string `gorm:"type:varchar(255);not null;comment:client_id"`
UserID string `gorm:"type:varchar(255);not null;comment:user_id"`
Scopes []string `gorm:"type:text;comment:scopes"`
CallbackURI string `gorm:"type:varchar(255);not null;comment:callback_uri"`
State string `gorm:"type:varchar(255);not null;comment:state"`
Acr string `gorm:"type:varchar(255);not null;comment:acr"`
Amr []string `gorm:"type:text;comment:amr"`
ResponseType oidc.ResponseType `gorm:"type:varchar(255);not null;comment:response_type"`
ResponseMode oidc.ResponseMode `gorm:"type:varchar(255);not null;comment:response_mode"`
done bool `gorm:"type:boolean;not null;default:false;comment:done"`
authTime time.Time `gorm:"type:timestamp;not null;comment:auth_time"`
CreatedAt time.Time `gorm:"type:timestamp;not null;comment:created_at"`
UpdatedAt time.Time `gorm:"type:timestamp;not null;comment:updated_at"`
DeletedAt gorm.DeletedAt `gorm:"type:timestamp;comment:deleted_at"`
}
func (a *AuthRequest) GetID() string {
return a.ID.String()
}
func (a *AuthRequest) GetACR() string {
return a.Acr
}
func (a *AuthRequest) GetAMR() []string {
return a.Amr
}
func (a *AuthRequest) GetAudience() []string {
panic("not implemented") // TODO: Implement
}
func (a *AuthRequest) GetAuthTime() time.Time {
return a.authTime
}
func (a *AuthRequest) GetClientID() string {
return a.ClientID
}
func (a *AuthRequest) GetCodeChallenge() *oidc.CodeChallenge {
panic("not implemented") // TODO: Implement
}
func (a *AuthRequest) GetNonce() string {
panic("not implemented") // TODO: Implement
}
func (a *AuthRequest) GetRedirectURI() string {
panic("not implemented") // TODO: Implement
}
func (a *AuthRequest) GetResponseType() oidc.ResponseType {
panic("not implemented") // TODO: Implement
}
func (a *AuthRequest) GetResponseMode() oidc.ResponseMode {
panic("not implemented") // TODO: Implement
}
func (a *AuthRequest) GetScopes() []string {
panic("not implemented") // TODO: Implement
}
func (a *AuthRequest) GetState() string {
panic("not implemented") // TODO: Implement
}
func (a *AuthRequest) GetSubject() string {
panic("not implemented") // TODO: Implement
}
func (a *AuthRequest) Done() bool {
panic("not implemented") // TODO: Implement
}