Files
dex/storage/ent/db/authrequest/authrequest.go
546e66cb5d feat: add WebAuthn support (#4704)
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
Signed-off-by: Maksim Nabokikh <max.nabokih@gmail.com>
Co-authored-by: Alwx <alwxsin@gmail.com>
2026-04-02 11:48:46 +02:00

227 lines
8.8 KiB
Go

// Code generated by ent, DO NOT EDIT.
package authrequest
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the authrequest type in the database.
Label = "auth_request"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldClientID holds the string denoting the client_id field in the database.
FieldClientID = "client_id"
// FieldScopes holds the string denoting the scopes field in the database.
FieldScopes = "scopes"
// FieldResponseTypes holds the string denoting the response_types field in the database.
FieldResponseTypes = "response_types"
// FieldRedirectURI holds the string denoting the redirect_uri field in the database.
FieldRedirectURI = "redirect_uri"
// FieldNonce holds the string denoting the nonce field in the database.
FieldNonce = "nonce"
// FieldState holds the string denoting the state field in the database.
FieldState = "state"
// FieldForceApprovalPrompt holds the string denoting the force_approval_prompt field in the database.
FieldForceApprovalPrompt = "force_approval_prompt"
// FieldLoggedIn holds the string denoting the logged_in field in the database.
FieldLoggedIn = "logged_in"
// FieldClaimsUserID holds the string denoting the claims_user_id field in the database.
FieldClaimsUserID = "claims_user_id"
// FieldClaimsUsername holds the string denoting the claims_username field in the database.
FieldClaimsUsername = "claims_username"
// FieldClaimsEmail holds the string denoting the claims_email field in the database.
FieldClaimsEmail = "claims_email"
// FieldClaimsEmailVerified holds the string denoting the claims_email_verified field in the database.
FieldClaimsEmailVerified = "claims_email_verified"
// FieldClaimsGroups holds the string denoting the claims_groups field in the database.
FieldClaimsGroups = "claims_groups"
// FieldClaimsPreferredUsername holds the string denoting the claims_preferred_username field in the database.
FieldClaimsPreferredUsername = "claims_preferred_username"
// FieldConnectorID holds the string denoting the connector_id field in the database.
FieldConnectorID = "connector_id"
// FieldConnectorData holds the string denoting the connector_data field in the database.
FieldConnectorData = "connector_data"
// FieldExpiry holds the string denoting the expiry field in the database.
FieldExpiry = "expiry"
// FieldCodeChallenge holds the string denoting the code_challenge field in the database.
FieldCodeChallenge = "code_challenge"
// FieldCodeChallengeMethod holds the string denoting the code_challenge_method field in the database.
FieldCodeChallengeMethod = "code_challenge_method"
// FieldHmacKey holds the string denoting the hmac_key field in the database.
FieldHmacKey = "hmac_key"
// FieldMfaValidated holds the string denoting the mfa_validated field in the database.
FieldMfaValidated = "mfa_validated"
// FieldWebauthnSessionData holds the string denoting the webauthn_session_data field in the database.
FieldWebauthnSessionData = "webauthn_session_data"
// FieldPrompt holds the string denoting the prompt field in the database.
FieldPrompt = "prompt"
// FieldMaxAge holds the string denoting the max_age field in the database.
FieldMaxAge = "max_age"
// FieldAuthTime holds the string denoting the auth_time field in the database.
FieldAuthTime = "auth_time"
// Table holds the table name of the authrequest in the database.
Table = "auth_requests"
)
// Columns holds all SQL columns for authrequest fields.
var Columns = []string{
FieldID,
FieldClientID,
FieldScopes,
FieldResponseTypes,
FieldRedirectURI,
FieldNonce,
FieldState,
FieldForceApprovalPrompt,
FieldLoggedIn,
FieldClaimsUserID,
FieldClaimsUsername,
FieldClaimsEmail,
FieldClaimsEmailVerified,
FieldClaimsGroups,
FieldClaimsPreferredUsername,
FieldConnectorID,
FieldConnectorData,
FieldExpiry,
FieldCodeChallenge,
FieldCodeChallengeMethod,
FieldHmacKey,
FieldMfaValidated,
FieldWebauthnSessionData,
FieldPrompt,
FieldMaxAge,
FieldAuthTime,
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
return false
}
var (
// DefaultClaimsPreferredUsername holds the default value on creation for the "claims_preferred_username" field.
DefaultClaimsPreferredUsername string
// DefaultCodeChallenge holds the default value on creation for the "code_challenge" field.
DefaultCodeChallenge string
// DefaultCodeChallengeMethod holds the default value on creation for the "code_challenge_method" field.
DefaultCodeChallengeMethod string
// DefaultMfaValidated holds the default value on creation for the "mfa_validated" field.
DefaultMfaValidated bool
// DefaultPrompt holds the default value on creation for the "prompt" field.
DefaultPrompt string
// DefaultMaxAge holds the default value on creation for the "max_age" field.
DefaultMaxAge int
// IDValidator is a validator for the "id" field. It is called by the builders before save.
IDValidator func(string) error
)
// OrderOption defines the ordering options for the AuthRequest queries.
type OrderOption func(*sql.Selector)
// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldID, opts...).ToFunc()
}
// ByClientID orders the results by the client_id field.
func ByClientID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldClientID, opts...).ToFunc()
}
// ByRedirectURI orders the results by the redirect_uri field.
func ByRedirectURI(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRedirectURI, opts...).ToFunc()
}
// ByNonce orders the results by the nonce field.
func ByNonce(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldNonce, opts...).ToFunc()
}
// ByState orders the results by the state field.
func ByState(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldState, opts...).ToFunc()
}
// ByForceApprovalPrompt orders the results by the force_approval_prompt field.
func ByForceApprovalPrompt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldForceApprovalPrompt, opts...).ToFunc()
}
// ByLoggedIn orders the results by the logged_in field.
func ByLoggedIn(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLoggedIn, opts...).ToFunc()
}
// ByClaimsUserID orders the results by the claims_user_id field.
func ByClaimsUserID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldClaimsUserID, opts...).ToFunc()
}
// ByClaimsUsername orders the results by the claims_username field.
func ByClaimsUsername(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldClaimsUsername, opts...).ToFunc()
}
// ByClaimsEmail orders the results by the claims_email field.
func ByClaimsEmail(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldClaimsEmail, opts...).ToFunc()
}
// ByClaimsEmailVerified orders the results by the claims_email_verified field.
func ByClaimsEmailVerified(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldClaimsEmailVerified, opts...).ToFunc()
}
// ByClaimsPreferredUsername orders the results by the claims_preferred_username field.
func ByClaimsPreferredUsername(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldClaimsPreferredUsername, opts...).ToFunc()
}
// ByConnectorID orders the results by the connector_id field.
func ByConnectorID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldConnectorID, opts...).ToFunc()
}
// ByExpiry orders the results by the expiry field.
func ByExpiry(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldExpiry, opts...).ToFunc()
}
// ByCodeChallenge orders the results by the code_challenge field.
func ByCodeChallenge(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCodeChallenge, opts...).ToFunc()
}
// ByCodeChallengeMethod orders the results by the code_challenge_method field.
func ByCodeChallengeMethod(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCodeChallengeMethod, opts...).ToFunc()
}
// ByMfaValidated orders the results by the mfa_validated field.
func ByMfaValidated(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMfaValidated, opts...).ToFunc()
}
// ByPrompt orders the results by the prompt field.
func ByPrompt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPrompt, opts...).ToFunc()
}
// ByMaxAge orders the results by the max_age field.
func ByMaxAge(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMaxAge, opts...).ToFunc()
}
// ByAuthTime orders the results by the auth_time field.
func ByAuthTime(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAuthTime, opts...).ToFunc()
}