core

package
v0.56.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Re-exports of the public types, constants, sentinel errors, and helper functions implemented in internal/authcore. This is the public alias layer: when authcore's exported surface changes, mirror the intended-public symbols here. The Service facade itself lives in facade.go / facade_methods.go.

Package core is the public, embedder-facing API of AuthKit.

The full service implementation lives in internal/authcore (driven by the authkit/http transport). core re-exports the public data types, config, constants, sentinel errors, and helper functions (see aliases.go), and exposes a deliberately small Service facade: only the methods an embedding application needs to provision, manage, mint, and query. Auth-flow plumbing that exists solely to serve the HTTP handlers is intentionally NOT on this facade — it stays internal so the v1 contract stays small and stable.

Curated embedder-facing methods of the public core.Service facade. Each one delegates to the internal engine (s.impl, *authcore.Service). Driven by real consumer usage, kept minimal (see SEMVER.md, #126/#130).

Index

Constants

View Source
const AdminUserSortCreatedAt = authcore.AdminUserSortCreatedAt

Re-exported constants.

View Source
const AdminUserSortEmail = authcore.AdminUserSortEmail
View Source
const AdminUserSortLastLogin = authcore.AdminUserSortLastLogin
View Source
const AdminUserSortUsername = authcore.AdminUserSortUsername
View Source
const AdminUserStatusActive = authcore.AdminUserStatusActive
View Source
const AdminUserStatusAny = authcore.AdminUserStatusAny
View Source
const AdminUserStatusBanned = authcore.AdminUserStatusBanned
View Source
const AdminUserStatusDeleted = authcore.AdminUserStatusDeleted
View Source
const AssuranceLevelMFA = authcore.AssuranceLevelMFA
View Source
const AssuranceLevelPassword = authcore.AssuranceLevelPassword
View Source
const DefaultBootstrapManifestPath = authcore.DefaultBootstrapManifestPath
View Source
const DefaultServiceJWTLifetime = authcore.DefaultServiceJWTLifetime
View Source
const DelegatedAccessTokenType = authcore.DelegatedAccessTokenType
View Source
const EphemeralMemory = authcore.EphemeralMemory
View Source
const EphemeralRedis = authcore.EphemeralRedis
View Source
const ErrCodeInvalidEmail = authcore.ErrCodeInvalidEmail
View Source
const ErrCodeInvalidPhoneNumber = authcore.ErrCodeInvalidPhoneNumber
View Source
const ErrCodeOwnerSlugTaken = authcore.ErrCodeOwnerSlugTaken
View Source
const ErrCodePasswordTooShort = authcore.ErrCodePasswordTooShort
View Source
const ErrCodeRenameRateLimited = authcore.ErrCodeRenameRateLimited
View Source
const ErrCodeUsernameCannotContainAt = authcore.ErrCodeUsernameCannotContainAt
View Source
const ErrCodeUsernameCannotStartWithPlus = authcore.ErrCodeUsernameCannotStartWithPlus
View Source
const ErrCodeUsernameInvalidCharacters = authcore.ErrCodeUsernameInvalidCharacters
View Source
const ErrCodeUsernameMustStartWithLetter = authcore.ErrCodeUsernameMustStartWithLetter
View Source
const ErrCodeUsernameNotAllowed = authcore.ErrCodeUsernameNotAllowed
View Source
const ErrCodeUsernameTooLong = authcore.ErrCodeUsernameTooLong
View Source
const ErrCodeUsernameTooShort = authcore.ErrCodeUsernameTooShort
View Source
const GroupInviteStatusAccepted = authcore.GroupInviteStatusAccepted
View Source
const GroupInviteStatusDeclined = authcore.GroupInviteStatusDeclined
View Source
const GroupInviteStatusExpired = authcore.GroupInviteStatusExpired
View Source
const GroupInviteStatusPending = authcore.GroupInviteStatusPending
View Source
const GroupInviteStatusRevoked = authcore.GroupInviteStatusRevoked
View Source
const HashAlgoLegacyResetRequired = authcore.HashAlgoLegacyResetRequired
View Source
const ImportStatusInserted = authcore.ImportStatusInserted
View Source
const ImportStatusRejected = authcore.ImportStatusRejected
View Source
const ImportStatusSkipped = authcore.ImportStatusSkipped
View Source
const KindChangeEmail = authcore.KindChangeEmail
View Source
const KindChangePhone = authcore.KindChangePhone
View Source
const KindRegisterEmail = authcore.KindRegisterEmail
View Source
const KindRegisterPhone = authcore.KindRegisterPhone
View Source
const MaxCustomJWTLifetime = authcore.MaxCustomJWTLifetime
View Source
const MemberRoleName = authcore.MemberRoleName
View Source
const OwnerRoleName = authcore.OwnerRoleName
View Source
const PermRootAPIKeysRevoke = authcore.PermRootAPIKeysRevoke
View Source
const PermRootGroupsCreate = authcore.PermRootGroupsCreate
View Source
const PermRootGroupsDelete = authcore.PermRootGroupsDelete
View Source
const PermRootRemoteAppsManage = authcore.PermRootRemoteAppsManage
View Source
const PermRootRolesManage = authcore.PermRootRolesManage
View Source
const PermRootSessionsRevoke = authcore.PermRootSessionsRevoke
View Source
const PermRootUsersBan = authcore.PermRootUsersBan
View Source
const PermRootUsersDelete = authcore.PermRootUsersDelete
View Source
const PermRootUsersRead = authcore.PermRootUsersRead
View Source
const PermRootUsersSuspend = authcore.PermRootUsersSuspend
View Source
const PermRootUsersUpdate = authcore.PermRootUsersUpdate
View Source
const RegistrationModeAdminBootstrapOnly = authcore.RegistrationModeAdminBootstrapOnly
View Source
const RegistrationModeAdminOnly = authcore.RegistrationModeAdminOnly
View Source
const RegistrationModeClosed = authcore.RegistrationModeClosed
View Source
const RegistrationModeInviteOnly = authcore.RegistrationModeInviteOnly
View Source
const RegistrationModeManifestOnly = authcore.RegistrationModeManifestOnly
View Source
const RegistrationModeOpen = authcore.RegistrationModeOpen
View Source
const RegistrationVerificationNone = authcore.RegistrationVerificationNone
View Source
const RegistrationVerificationOptional = authcore.RegistrationVerificationOptional
View Source
const RegistrationVerificationRequired = authcore.RegistrationVerificationRequired
View Source
const RemoteAppModeJWKS = authcore.RemoteAppModeJWKS
View Source
const RemoteAppModeStatic = authcore.RemoteAppModeStatic
View Source
const RemoteApplicationAccessTokenType = authcore.RemoteApplicationAccessTokenType
View Source
const RootPersona = authcore.RootPersona
View Source
const SensitiveActionFreshAuthWindow = authcore.SensitiveActionFreshAuthWindow
View Source
const ServiceJWTTokenUse = authcore.ServiceJWTTokenUse
View Source
const ServiceJWTType = authcore.ServiceJWTType
View Source
const SessionEventCreated = authcore.SessionEventCreated
View Source
const SessionEventFailed = authcore.SessionEventFailed
View Source
const SessionEventPasswordChange = authcore.SessionEventPasswordChange
View Source
const SessionEventPasswordRecovery = authcore.SessionEventPasswordRecovery
View Source
const SessionEventRevoked = authcore.SessionEventRevoked
View Source
const SessionRevokeReasonAdminRevoke = authcore.SessionRevokeReasonAdminRevoke
View Source
const SessionRevokeReasonAdminRevokeAll = authcore.SessionRevokeReasonAdminRevokeAll
View Source
const SessionRevokeReasonAdminSetPassword = authcore.SessionRevokeReasonAdminSetPassword
View Source
const SessionRevokeReasonBanned = authcore.SessionRevokeReasonBanned
View Source
const SessionRevokeReasonEvicted = authcore.SessionRevokeReasonEvicted
View Source
const SessionRevokeReasonLogout = authcore.SessionRevokeReasonLogout
View Source
const SessionRevokeReasonPasswordChange = authcore.SessionRevokeReasonPasswordChange
View Source
const SessionRevokeReasonRefreshReuseDetected = authcore.SessionRevokeReasonRefreshReuseDetected
View Source
const SessionRevokeReasonSoftDeleted = authcore.SessionRevokeReasonSoftDeleted
View Source
const SessionRevokeReasonUnknown = authcore.SessionRevokeReasonUnknown
View Source
const SessionRevokeReasonUserDisabled = authcore.SessionRevokeReasonUserDisabled
View Source
const SessionRevokeReasonUserRevoke = authcore.SessionRevokeReasonUserRevoke
View Source
const SessionRevokeReasonUserRevokeAll = authcore.SessionRevokeReasonUserRevokeAll
View Source
const SolanaProviderSlug = authcore.SolanaProviderSlug
View Source
const SolanaSNSStatusDisabled = authcore.SolanaSNSStatusDisabled
View Source
const SolanaSNSStatusError = authcore.SolanaSNSStatusError
View Source
const SolanaSNSStatusNotFound = authcore.SolanaSNSStatusNotFound
View Source
const SolanaSNSStatusPending = authcore.SolanaSNSStatusPending
View Source
const SolanaSNSStatusResolved = authcore.SolanaSNSStatusResolved
View Source
const SolanaSNSStatusStale = authcore.SolanaSNSStatusStale
View Source
const SubjectKindRemoteApp = authcore.SubjectKindRemoteApp
View Source
const SubjectKindUser = authcore.SubjectKindUser
View Source
const SuperAdminRoleName = authcore.SuperAdminRoleName

Variables

View Source
var APIKeyMarker = authcore.APIKeyMarker

Re-exported variables, sentinel errors, and functions.

View Source
var BuildSchema = authcore.BuildSchema
View Source
var ErrAccessTokenExpired = authcore.ErrAccessTokenExpired
View Source
var ErrAccessTokenRevoked = authcore.ErrAccessTokenRevoked
View Source
var ErrAttributeDefNotFound = authcore.ErrAttributeDefNotFound
View Source
var ErrCannotRemoveLastAdminRole = authcore.ErrCannotRemoveLastAdminRole
View Source
var ErrCustomClaimsReserved = authcore.ErrCustomClaimsReserved
View Source
var ErrEmailAlreadyVerified = authcore.ErrEmailAlreadyVerified
View Source
var ErrEmailDeliveryFailed = authcore.ErrEmailDeliveryFailed
View Source
var ErrEmailInUse = authcore.ErrEmailInUse
View Source
var ErrEmailSenderUnavailable = authcore.ErrEmailSenderUnavailable
View Source
var ErrEmptyCustomClaims = authcore.ErrEmptyCustomClaims
View Source
var ErrEntitlementFilterUnavailable = authcore.ErrEntitlementFilterUnavailable
View Source
var ErrGroupNotFound = authcore.ErrGroupNotFound
View Source
var ErrInvalidAccessToken = authcore.ErrInvalidAccessToken
View Source
var ErrInvalidAttributeDef = authcore.ErrInvalidAttributeDef
View Source
var ErrInvalidBootstrapManifest = authcore.ErrInvalidBootstrapManifest
View Source
var ErrInvalidRemoteApplication = authcore.ErrInvalidRemoteApplication
View Source
var ErrInvalidServiceJWT = authcore.ErrInvalidServiceJWT
View Source
var ErrInviteNotFound = authcore.ErrInviteNotFound
View Source
var ErrInviteNotPending = authcore.ErrInviteNotPending
View Source
var ErrMissingSigner = authcore.ErrMissingSigner
View Source
var ErrNotGroupMember = authcore.ErrNotGroupMember
View Source
var ErrOwnerSlugTaken = authcore.ErrOwnerSlugTaken
View Source
var ErrPasskeyCloneDetected = authcore.ErrPasskeyCloneDetected
View Source
var ErrPasskeyNotFound = authcore.ErrPasskeyNotFound
View Source
var ErrPasskeyUserVerificationRequired = authcore.ErrPasskeyUserVerificationRequired
View Source
var ErrPasswordResetRequired = authcore.ErrPasswordResetRequired
View Source
var ErrPendingRegistrationNotFound = authcore.ErrPendingRegistrationNotFound
View Source
var ErrPhoneAlreadyVerified = authcore.ErrPhoneAlreadyVerified
View Source
var ErrPhoneInUse = authcore.ErrPhoneInUse
View Source
var ErrReauthenticationRequired = authcore.ErrReauthenticationRequired
View Source
var ErrRegistrationDisabled = authcore.ErrRegistrationDisabled
View Source
var ErrRemoteApplicationNotFound = authcore.ErrRemoteApplicationNotFound
View Source
var ErrRenameRateLimited = authcore.ErrRenameRateLimited
View Source
var ErrReservedIssuer = authcore.ErrReservedIssuer
View Source
var ErrReservedRoleSlug = authcore.ErrReservedRoleSlug
View Source
var ErrSMSDeliveryFailed = authcore.ErrSMSDeliveryFailed
View Source
var ErrSMSSenderUnavailable = authcore.ErrSMSSenderUnavailable
View Source
var ErrTooManyCustomClaims = authcore.ErrTooManyCustomClaims
View Source
var ErrTwoFAEnrollmentRequired = authcore.ErrTwoFAEnrollmentRequired
View Source
var ErrUserBanned = authcore.ErrUserBanned
View Source
var ErrUserNotFound = authcore.ErrUserNotFound
View Source
var ErrUserRoleNotFound = authcore.ErrUserRoleNotFound
View Source
var ErrVerificationLinkExpired = authcore.ErrVerificationLinkExpired
View Source
var FormatAPIKey = authcore.FormatAPIKey
View Source
var HasAPIKeyPrefix = authcore.HasAPIKeyPrefix
View Source
var IntrinsicRootPermissions = authcore.IntrinsicRootPermissions
View Source
var IntrinsicRootPersona = authcore.IntrinsicRootPersona
View Source
var IsDevEnvironment = authcore.IsDevEnvironment
View Source
var LoadBootstrapManifestFile = authcore.LoadBootstrapManifestFile
View Source
var MintDelegatedAccessToken = authcore.MintDelegatedAccessToken
View Source
var MintRemoteApplicationAccessToken = authcore.MintRemoteApplicationAccessToken
View Source
var MintServiceJWT = authcore.MintServiceJWT
View Source
var NewGroupSchema = authcore.NewGroupSchema
View Source
var NewPermissionGroupStore = authcore.NewPermissionGroupStore
View Source
var NormalizeAllowedOrigin = authcore.NormalizeAllowedOrigin
View Source
var NormalizeAllowedOrigins = authcore.NormalizeAllowedOrigins
View Source
var NormalizeEmail = authcore.NormalizeEmail
View Source
var NormalizePhone = authcore.NormalizePhone
View Source
var NormalizePreferredLanguage = authcore.NormalizePreferredLanguage
View Source
var NormalizeRemoteAppTrustSource = authcore.NormalizeRemoteAppTrustSource
View Source
var OriginAllowed = authcore.OriginAllowed
View Source
var OwnerGrant = authcore.OwnerGrant
View Source
var ParseAPIKey = authcore.ParseAPIKey
View Source
var ParseBootstrapManifestYAML = authcore.ParseBootstrapManifestYAML
View Source
var PermAPIKeysManage = authcore.PermAPIKeysManage
View Source
var PermAPIKeysRead = authcore.PermAPIKeysRead
View Source
var PermInvitesManage = authcore.PermInvitesManage
View Source
var PermInvitesRead = authcore.PermInvitesRead
View Source
var PermMembersManage = authcore.PermMembersManage
View Source
var PermMembersRead = authcore.PermMembersRead
View Source
var PermRemoteAppsManage = authcore.PermRemoteAppsManage
View Source
var PermRemoteAppsRead = authcore.PermRemoteAppsRead
View Source
var PermRolesManage = authcore.PermRolesManage
View Source
var PermRolesRead = authcore.PermRolesRead
View Source
var PermissionPersona = authcore.PermissionPersona
View Source
var ValidateEmail = authcore.ValidateEmail
View Source
var ValidateGrantPattern = authcore.ValidateGrantPattern
View Source
var ValidatePassword = authcore.ValidatePassword
View Source
var ValidatePermission = authcore.ValidatePermission
View Source
var ValidatePhone = authcore.ValidatePhone
View Source
var ValidateUsername = authcore.ValidateUsername
View Source
var ValidationErrorCode = authcore.ValidationErrorCode
View Source
var WithAuthLogger = authcore.WithAuthLogger
View Source
var WithDBTXWrapper = authcore.WithDBTXWrapper
View Source
var WithEmailSender = authcore.WithEmailSender
View Source
var WithEntitlements = authcore.WithEntitlements
View Source
var WithEphemeralStore = authcore.WithEphemeralStore
View Source
var WithPostgres = authcore.WithPostgres
View Source
var WithResourceScopeAuthorizer = authcore.WithResourceScopeAuthorizer
View Source
var WithSMSSender = authcore.WithSMSSender
View Source
var WithSessionRevokeReason = authcore.WithSessionRevokeReason
View Source
var WithSolanaSNSResolver = authcore.WithSolanaSNSResolver

Functions

This section is empty.

Types

type APIKey added in v0.41.0

type APIKey = authcore.APIKey

type APIKeyMintOptions added in v0.41.0

type APIKeyMintOptions = authcore.APIKeyMintOptions

type APIKeyResource added in v0.41.0

type APIKeyResource = authcore.APIKeyResource

type APIKeysConfig added in v0.47.0

type APIKeysConfig = authcore.APIKeysConfig

type AdminListUsersResult

type AdminListUsersResult = authcore.AdminListUsersResult

type AdminRecoverUserInput added in v0.54.0

type AdminRecoverUserInput = authcore.AdminRecoverUserInput

type AdminUser

type AdminUser = authcore.AdminUser

type AdminUserListOptions added in v0.40.0

type AdminUserListOptions = authcore.AdminUserListOptions

type AdminUserSort added in v0.40.0

type AdminUserSort = authcore.AdminUserSort

type AdminUserStatus added in v0.40.0

type AdminUserStatus = authcore.AdminUserStatus

type AuthEventLogReader added in v0.4.2

type AuthEventLogReader = authcore.AuthEventLogReader

type AuthEventLogger

type AuthEventLogger = authcore.AuthEventLogger

type AuthSessionEvent

type AuthSessionEvent = authcore.AuthSessionEvent

type BatchEntitlementsProvider added in v0.21.0

type BatchEntitlementsProvider = authcore.BatchEntitlementsProvider

type BootstrapManifest added in v0.37.0

type BootstrapManifest = authcore.BootstrapManifest

type BootstrapManifestGlobalRole added in v0.37.0

type BootstrapManifestGlobalRole = authcore.BootstrapManifestGlobalRole

type BootstrapManifestResult added in v0.37.0

type BootstrapManifestResult = authcore.BootstrapManifestResult

type BootstrapManifestUser added in v0.37.0

type BootstrapManifestUser = authcore.BootstrapManifestUser

type BootstrapReconcileOptions added in v0.37.0

type BootstrapReconcileOptions = authcore.BootstrapReconcileOptions

type BootstrapUserPassword added in v0.37.0

type BootstrapUserPassword = authcore.BootstrapUserPassword

type Config

type Config = authcore.Config

type CreatePermissionGroupRequest added in v0.49.0

type CreatePermissionGroupRequest = authcore.CreatePermissionGroupRequest

type CustomJWTMintOptions added in v0.26.0

type CustomJWTMintOptions = authcore.CustomJWTMintOptions

type CustomRoleResolver added in v0.49.0

type CustomRoleResolver = authcore.CustomRoleResolver

type DelegatedAccessParams added in v0.26.0

type DelegatedAccessParams = authcore.DelegatedAccessParams

type EmailSender

type EmailSender = authcore.EmailSender

type EntitlementFilterProvider added in v0.40.0

type EntitlementFilterProvider = authcore.EntitlementFilterProvider

type EntitlementsProvider

type EntitlementsProvider = authcore.EntitlementsProvider

type EphemeralMode

type EphemeralMode = authcore.EphemeralMode

type EphemeralStore

type EphemeralStore = authcore.EphemeralStore

type FrontendConfig added in v0.47.0

type FrontendConfig = authcore.FrontendConfig

type GeneratedRoute added in v0.49.0

type GeneratedRoute = authcore.GeneratedRoute

type GroupAssignment added in v0.49.0

type GroupAssignment = authcore.GroupAssignment

type GroupInvite added in v0.50.0

type GroupInvite = authcore.GroupInvite

type GroupMember added in v0.49.0

type GroupMember = authcore.GroupMember

type GroupSchema added in v0.49.0

type GroupSchema = authcore.GroupSchema

type IdentityConfig added in v0.47.0

type IdentityConfig = authcore.IdentityConfig

type ImportUserInput added in v0.9.0

type ImportUserInput = authcore.ImportUserInput

type ImportUserResult added in v0.56.0

type ImportUserResult = authcore.ImportUserResult

type ImportUserStatus added in v0.56.0

type ImportUserStatus = authcore.ImportUserStatus

type ImportUsersResult added in v0.56.0

type ImportUsersResult = authcore.ImportUsersResult

Re-exported types. #130 bulk-import result types + status constants (hand-added; the generator also picks these up on a full regen).

type KeysConfig added in v0.47.0

type KeysConfig = authcore.KeysConfig

type Keyset

type Keyset = authcore.Keyset

type MFAStatus added in v0.56.0

type MFAStatus = authcore.MFAStatus

type ManagementProfile added in v0.49.0

type ManagementProfile = authcore.ManagementProfile

type Option added in v0.47.0

type Option = authcore.Option

type Options

type Options = authcore.Options

type Passkey added in v0.56.0

type Passkey = authcore.Passkey

type PasskeyConfig added in v0.56.0

type PasskeyConfig = authcore.PasskeyConfig

type PasskeyLoginResult added in v0.56.0

type PasskeyLoginResult = authcore.PasskeyLoginResult

type PendingChangeKind added in v0.15.5

type PendingChangeKind = authcore.PendingChangeKind

type PendingRegistration

type PendingRegistration = authcore.PendingRegistration

type PermissionDef added in v0.11.3

type PermissionDef = authcore.PermissionDef

type PermissionGroupStore added in v0.49.0

type PermissionGroupStore = authcore.PermissionGroupStore

type PersonaDef added in v0.56.0

type PersonaDef = authcore.PersonaDef

type PreferredLanguage added in v0.54.0

type PreferredLanguage = authcore.PreferredLanguage

type RBACConfig added in v0.47.0

type RBACConfig = authcore.RBACConfig

type RegistrationConfig added in v0.47.0

type RegistrationConfig = authcore.RegistrationConfig

type RegistrationMode added in v0.12.4

type RegistrationMode = authcore.RegistrationMode

type RegistrationVerificationPolicy added in v0.5.0

type RegistrationVerificationPolicy = authcore.RegistrationVerificationPolicy

type RemoteAppAttributeDef added in v0.27.0

type RemoteAppAttributeDef = authcore.RemoteAppAttributeDef

type RemoteAppKey added in v0.27.0

type RemoteAppKey = authcore.RemoteAppKey

type RemoteApplication added in v0.27.0

type RemoteApplication = authcore.RemoteApplication

type RemoteApplicationAccessParams added in v0.28.0

type RemoteApplicationAccessParams = authcore.RemoteApplicationAccessParams

type RemovedMFARoleAssignment added in v0.56.0

type RemovedMFARoleAssignment = authcore.RemovedMFARoleAssignment

type ResolvedAPIKey added in v0.41.0

type ResolvedAPIKey = authcore.ResolvedAPIKey

type ResourceScopeAuthorizationRequest added in v0.12.4

type ResourceScopeAuthorizationRequest = authcore.ResourceScopeAuthorizationRequest

type ResourceScopeAuthorizer added in v0.12.4

type ResourceScopeAuthorizer = authcore.ResourceScopeAuthorizer

type RoleDef added in v0.49.0

type RoleDef = authcore.RoleDef

type SMSHealthChecker added in v0.15.4

type SMSHealthChecker = authcore.SMSHealthChecker

type SMSSender

type SMSSender = authcore.SMSSender

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is the public AuthKit service facade. It wraps the internal engine and exposes the curated embedder API (facade_methods.go). Construct it with NewFromConfig (recommended) or NewService.

func NewFromConfig

func NewFromConfig(cfg Config, pg *pgxpool.Pool, extraOpts ...Option) (*Service, error)

NewFromConfig builds a Service from host configuration. Postgres is required (positional); optional dependencies are functional options.

func NewService

func NewService(opts Options, keys Keyset, coreOpts ...Option) *Service

NewService builds a Service from already-resolved Options and Keyset.

func Wrap added in v0.56.0

func Wrap(impl *authcore.Service) *Service

Wrap adapts an internal engine into the public facade. It is used by the authkit/http transport to back svc.Core(); the parameter type lives in internal/ and cannot be named (or constructed) outside the module, so this does not expose the full engine to external callers.

func (*Service) AdminCountUsers added in v0.40.0

func (s *Service) AdminCountUsers(ctx context.Context, opts AdminUserListOptions) (int64, error)

func (*Service) AdminGetUser

func (s *Service) AdminGetUser(ctx context.Context, id string) (*AdminUser, error)

func (*Service) AdminListUserSessions

func (s *Service) AdminListUserSessions(ctx context.Context, userID string) ([]Session, error)

func (*Service) AdminListUsers

func (s *Service) AdminListUsers(ctx context.Context, opts AdminUserListOptions) (*AdminListUsersResult, error)

func (*Service) AdminRevokeUserSessions

func (s *Service) AdminRevokeUserSessions(ctx context.Context, userID string) error

func (*Service) AdminSetPassword

func (s *Service) AdminSetPassword(ctx context.Context, userID, new string) error

func (*Service) AssignGroupRole added in v0.49.0

func (s *Service) AssignGroupRole(ctx context.Context, persona, resourceSlug, subjectID, subjectKind, role string) error

func (*Service) AssignRoleBySlug

func (s *Service) AssignRoleBySlug(ctx context.Context, userID, slug string) error

func (*Service) BanUser

func (s *Service) BanUser(ctx context.Context, userID string, reason *string, until *time.Time, bannedBy string) error

func (*Service) Can added in v0.49.0

func (s *Service) Can(ctx context.Context, subjectID, subjectKind, persona, resourceSlug, perm string) (bool, error)

func (*Service) ChangePassword

func (s *Service) ChangePassword(ctx context.Context, userID, current, new string, keepSessionID *string) error

func (*Service) CheckSMSHealth added in v0.15.4

func (s *Service) CheckSMSHealth(ctx context.Context) error

func (*Service) CleanupExpiredAuthState added in v0.9.0

func (s *Service) CleanupExpiredAuthState(ctx context.Context) error

func (*Service) CreatePermissionGroup added in v0.49.0

func (s *Service) CreatePermissionGroup(ctx context.Context, req CreatePermissionGroupRequest) (string, error)

func (*Service) CreateUser

func (s *Service) CreateUser(ctx context.Context, email, username string) (*User, error)

func (*Service) DeleteRemoteApplication added in v0.27.0

func (s *Service) DeleteRemoteApplication(ctx context.Context, issuer string) error

func (*Service) EnsureRootGroup added in v0.49.0

func (s *Service) EnsureRootGroup(ctx context.Context) (string, error)

func (*Service) EntitlementsProvider

func (s *Service) EntitlementsProvider() EntitlementsProvider

func (*Service) EphemeralMode

func (s *Service) EphemeralMode() EphemeralMode

func (*Service) ExchangeRefreshToken

func (s *Service) ExchangeRefreshToken(ctx context.Context, refreshToken string, ua string, ip net.IP) (string, time.Time, string, error)

func (*Service) GetEmailByUserID

func (s *Service) GetEmailByUserID(ctx context.Context, id string) (string, error)

func (*Service) GetProviderUsername

func (s *Service) GetProviderUsername(ctx context.Context, userID, provider string) (string, error)

func (*Service) GetRemoteApplication added in v0.27.0

func (s *Service) GetRemoteApplication(ctx context.Context, issuer string) (*RemoteApplication, error)

func (*Service) GetUserByEmail

func (s *Service) GetUserByEmail(ctx context.Context, email string) (*User, error)

func (*Service) GetUserByPhone

func (s *Service) GetUserByPhone(ctx context.Context, phone string) (*User, error)

func (*Service) GetUserBySolanaAddress

func (s *Service) GetUserBySolanaAddress(ctx context.Context, address string) (*User, error)

func (*Service) GetUserByUsername

func (s *Service) GetUserByUsername(ctx context.Context, username string) (*User, error)

func (*Service) HardDeleteUser

func (s *Service) HardDeleteUser(ctx context.Context, userID string) error

func (*Service) HasEmailSender

func (s *Service) HasEmailSender() bool

func (*Service) HasSMSSender

func (s *Service) HasSMSSender() bool

func (*Service) ImportUsers added in v0.56.0

func (s *Service) ImportUsers(ctx context.Context, inputs []ImportUserInput) (ImportUsersResult, error)

func (*Service) IsUserAllowed

func (s *Service) IsUserAllowed(ctx context.Context, userID string) (bool, error)

func (*Service) IssueAccessToken

func (s *Service) IssueAccessToken(ctx context.Context, userID, email string, extra map[string]any) (string, time.Time, error)

func (*Service) JWKS

func (s *Service) JWKS() jwtkit.JWKS

func (*Service) Keyfunc

func (s *Service) Keyfunc() func(token *jwt.Token) (any, error)

func (*Service) LinkProvider

func (s *Service) LinkProvider(ctx context.Context, userID, provider, subject string, email *string) error

func (*Service) ListAPIKeys added in v0.41.0

func (s *Service) ListAPIKeys(ctx context.Context, persona, resourceSlug string) ([]APIKey, error)

func (*Service) ListEntitlements

func (s *Service) ListEntitlements(ctx context.Context, userID string) []string

func (*Service) ListGroupMembers added in v0.49.0

func (s *Service) ListGroupMembers(ctx context.Context, persona, resourceSlug string) ([]GroupMember, error)

func (*Service) ListRemoteApplications added in v0.27.0

func (s *Service) ListRemoteApplications(ctx context.Context, activeOnly bool) ([]RemoteApplication, error)

func (*Service) ListRoleSlugsByUser

func (s *Service) ListRoleSlugsByUser(ctx context.Context, userID string) []string

func (*Service) ListSubjectGroups added in v0.49.0

func (s *Service) ListSubjectGroups(ctx context.Context, subjectID, subjectKind string) ([]SubjectGroupMembership, error)

func (*Service) ListUserSessions

func (s *Service) ListUserSessions(ctx context.Context, userID string) ([]Session, error)

func (*Service) ListUsersDeletedBefore

func (s *Service) ListUsersDeletedBefore(ctx context.Context, cutoff time.Time, limit int) ([]string, error)

func (*Service) MintAPIKey added in v0.41.0

func (s *Service) MintAPIKey(ctx context.Context, persona, resourceSlug, name, role, createdBy string, expiresAt *time.Time) (APIKey, string, error)

func (*Service) MintAPIKeyWithOptions added in v0.41.0

func (s *Service) MintAPIKeyWithOptions(ctx context.Context, persona, resourceSlug string, opts APIKeyMintOptions) (APIKey, string, error)

func (*Service) MintCustomJWT added in v0.26.0

func (s *Service) MintCustomJWT(ctx context.Context, opts CustomJWTMintOptions) (string, error)

func (*Service) MintDelegatedAccessToken added in v0.26.0

func (s *Service) MintDelegatedAccessToken(ctx context.Context, p DelegatedAccessParams) (string, error)

func (*Service) MintRemoteApplicationAccessToken added in v0.28.0

func (s *Service) MintRemoteApplicationAccessToken(ctx context.Context, p RemoteApplicationAccessParams) (string, error)

func (*Service) MintServiceJWT added in v0.13.1

func (s *Service) MintServiceJWT(ctx context.Context, opts ServiceJWTMintOptions) (string, ServiceJWTClaims, error)

func (*Service) Options

func (s *Service) Options() Options

func (*Service) Postgres

func (s *Service) Postgres() *pgxpool.Pool

func (*Service) PublicKeysByKID added in v0.6.0

func (s *Service) PublicKeysByKID() map[string]crypto.PublicKey

func (*Service) ReconcileBootstrapManifest added in v0.37.0

func (s *Service) ReconcileBootstrapManifest(ctx context.Context, manifest BootstrapManifest, opts BootstrapReconcileOptions) (BootstrapManifestResult, error)

func (*Service) RemoveRoleBySlug

func (s *Service) RemoveRoleBySlug(ctx context.Context, userID, slug string) error

func (*Service) ResolveAPIKey added in v0.41.0

func (s *Service) ResolveAPIKey(ctx context.Context, keyID, secret string) (string, []string, error)

func (*Service) ResolveAPIKeyWithResources added in v0.41.0

func (s *Service) ResolveAPIKeyWithResources(ctx context.Context, keyID, secret string) (ResolvedAPIKey, error)

func (*Service) ResolveGroupIDForSlug added in v0.56.0

func (s *Service) ResolveGroupIDForSlug(ctx context.Context, persona, resourceSlug string) (string, error)

func (*Service) ResolveRemoteAppAttributeDef added in v0.27.0

func (s *Service) ResolveRemoteAppAttributeDef(ctx context.Context, appID, key string, version int32) (*RemoteAppAttributeDef, error)

func (*Service) ResolveRemoteApplicationAuthority added in v0.28.0

func (s *Service) ResolveRemoteApplicationAuthority(ctx context.Context, appID string) ([]string, error)

func (*Service) RestoreUser

func (s *Service) RestoreUser(ctx context.Context, id string) error

func (*Service) RevokeAPIKey added in v0.41.0

func (s *Service) RevokeAPIKey(ctx context.Context, persona, resourceSlug, tokenID string) (bool, error)

func (*Service) RevokeAllSessions

func (s *Service) RevokeAllSessions(ctx context.Context, userID string, keepSessionID *string) error

func (*Service) SMSAvailable added in v0.15.4

func (s *Service) SMSAvailable() bool

func (*Service) Schema added in v0.26.0

func (s *Service) Schema() string

func (*Service) SeedPermissionGroupContainment added in v0.49.0

func (s *Service) SeedPermissionGroupContainment(ctx context.Context) error

func (*Service) SetEmailVerified

func (s *Service) SetEmailVerified(ctx context.Context, id string, v bool) error

func (*Service) SetEntitlementsProvider added in v0.48.0

func (s *Service) SetEntitlementsProvider(p EntitlementsProvider)

func (*Service) SoftDeleteUser

func (s *Service) SoftDeleteUser(ctx context.Context, id string) error

func (*Service) UnbanUser

func (s *Service) UnbanUser(ctx context.Context, userID string) error

func (*Service) UnlinkProvider

func (s *Service) UnlinkProvider(ctx context.Context, userID, provider string) error

func (*Service) UpdateBiography

func (s *Service) UpdateBiography(ctx context.Context, id string, bio *string) error

func (*Service) UpdateEmail

func (s *Service) UpdateEmail(ctx context.Context, id, email string) error

func (*Service) UpdateUsername

func (s *Service) UpdateUsername(ctx context.Context, id, username string) error

func (*Service) UpsertPasswordHash

func (s *Service) UpsertPasswordHash(ctx context.Context, userID, hash, algo string, params []byte) error

func (*Service) UpsertRemoteApplication added in v0.27.0

func (s *Service) UpsertRemoteApplication(ctx context.Context, in RemoteApplication) (*RemoteApplication, error)

func (*Service) UpsertRoleBySlug added in v0.9.0

func (s *Service) UpsertRoleBySlug(ctx context.Context, name, slug string, description *string) error

func (*Service) ValidateVerificationConfiguration added in v0.5.0

func (s *Service) ValidateVerificationConfiguration() error

func (*Service) VerifyUserPassword added in v0.5.1

func (s *Service) VerifyUserPassword(ctx context.Context, userID, pass string) bool

type ServiceJWTClaims added in v0.13.1

type ServiceJWTClaims = authcore.ServiceJWTClaims

type ServiceJWTMintOptions added in v0.13.1

type ServiceJWTMintOptions = authcore.ServiceJWTMintOptions

type Session

type Session = authcore.Session

type SessionEventType

type SessionEventType = authcore.SessionEventType

type SessionFreshness added in v0.8.3

type SessionFreshness = authcore.SessionFreshness

type SessionRevokeReason

type SessionRevokeReason = authcore.SessionRevokeReason

type SolanaConfig added in v0.47.0

type SolanaConfig = authcore.SolanaConfig

type SolanaLinkedAccount added in v0.15.0

type SolanaLinkedAccount = authcore.SolanaLinkedAccount

type SolanaSNSResolver added in v0.15.0

type SolanaSNSResolver = authcore.SolanaSNSResolver

type SubjectGroupMembership added in v0.49.0

type SubjectGroupMembership = authcore.SubjectGroupMembership

type TokenConfig added in v0.47.0

type TokenConfig = authcore.TokenConfig

type TwoFactorConfig added in v0.53.0

type TwoFactorConfig = authcore.TwoFactorConfig

type TwoFactorFactor added in v0.54.0

type TwoFactorFactor = authcore.TwoFactorFactor

type TwoFactorSettings

type TwoFactorSettings = authcore.TwoFactorSettings

type User

type User = authcore.User

type ValidationError added in v0.8.6

type ValidationError = authcore.ValidationError

type VerificationMessage added in v0.5.0

type VerificationMessage = authcore.VerificationMessage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL