serverpod_auth_core_server library
This library should not be directly imported in application code. It contains exports required by the code generator to integrate the Serverpod Auth Core module.
Classes
- Argon2HashParameters
- Parameters for hashing a secret using the Argon2id algorithm.
- Argon2HashUtil
- A consolidated utility for handling Argon2id-based secret hashing.
- AuthServices
- Global configuration for auth providers that are exposed through endpoints. This object is also used to manage the lifecycle of authentication tokens regardless of who issues the token.
- AuthSuccess
- Response model representing a successful authentication result with all relevant authentication information.
- AuthUser
- Core database entity representing a user in the authentication system.
- AuthUserInclude
- AuthUserIncludeList
- AuthUserModel
- DTO for transferring authentication user information.
- AuthUserRepository
- AuthUsers
- Management functions for auth users.
- AuthUsersConfig
- Configuration options for the auth users module.
- AuthUserTable
- AuthUserUpdateTable
- EcdsaSha512JwtAlgorithmConfiguration
- ECDSA SHA-512 JWT algorithm configuration.
- ECPrivateKey
- For ECDSA algorithm, in sign method
- ECPublicKey
- For ECDSA algorithm, in verify method
- Endpoints
- HmacSha512JwtAlgorithmConfiguration
- HMAC SHA-512 JWT algorithm configuration.
-
IdentityProviderBuilder<
T extends Object> - Interface for building identity providers.
- Jwt
- Business logic for handling JWT-based access and refresh tokens.
- JwtAdmin
- Collection of admin functions for managing authentication tokens.
- JwtAlgorithm
- Configuration for an authentication token algorithm.
- JwtConfig
- Configuration options for the JWT authentication module.
- JwtConfigFromPasswords
-
Creates a new JwtConfig from keys on the
passwords.yamlfile. - JwtContext
- Context provided to the JwtConfig.extraClaimsProvider.
- JwtTokenInfo
- DTO for transferring JWT token information between server and client.
- JwtTokenManager
- Token manager adapter for Jwt.
- MultiTokenManager
- A composite token manager that delegates operations to multiple underlying token managers.
-
PreBuiltIdpBuilder<
T extends Object> - A builder that returns a pre-built identity provider.
-
PreBuiltTokenManagerBuilder<
T extends TokenManager> - A builder that returns a pre-built token manager.
- Protocol
- RefreshJwtTokensEndpoint
- Endpoint for JWT tokens management.
- RefreshToken
- Refresh token for JWT-based authentication.
- RefreshTokenAttachRowRepository
- RefreshTokenInclude
- RefreshTokenIncludeList
- RefreshTokenRepository
- RefreshTokenTable
- RefreshTokenUpdateTable
- SecretKey
- For HMAC algorithms
- ServerSideSession
- Server-side authentication session.
- ServerSideSessionAttachRowRepository
- ServerSideSessionInclude
- ServerSideSessionIncludeList
- ServerSideSessionInfo
- DTO for transferring server-side session information between server and client.
- ServerSideSessionRepository
- ServerSideSessions
- Management functions for ServerSideSessions.
- ServerSideSessionsAdmin
- Collection of admin functions for managing sessions.
- ServerSideSessionsConfig
- Configuration options for the session module.
- ServerSideSessionsConfigFromPasswords
-
Creates a new ServerSideSessionsConfig from keys on the
passwords.yamlfile. - ServerSideSessionsTokenManager
- Token manager adapter for ServerSideSessions.
- ServerSideSessionTable
- ServerSideSessionUpdateTable
- TokenInfo
- Information about an authentication token.
- TokenIssuer
- An interface for issuing authentication tokens.
- TokenManager
- An interface for managing authentication tokens.
-
TokenManagerBuilder<
T extends TokenManager> - Interface for builders that can create token managers.
- TokenPair
- A pair of refresh and access tokens, in their external format.
- UserImageFromBytes
- User image source from raw bytes.
- UserImageFromUrl
- User image source from a URL.
- UserImageSource
- Source of a user image.
- UserProfile
- Core database entity representing a user profile in the authentication system.
- UserProfileAttachRowRepository
- UserProfileConfig
- Configuration options for the user profile module.
- UserProfileData
- Lightweight DTO to be used as specification while creating a new user profile.
- UserProfileDetachRowRepository
- UserProfileEditBaseEndpoint
- Base endpoint for user profile management.
- UserProfileImage
- Database entity for storing user profile image information.
- UserProfileImageAttachRowRepository
- UserProfileImageInclude
- UserProfileImageIncludeList
- UserProfileImageRepository
- UserProfileImageTable
- UserProfileImageUpdateTable
- UserProfileInclude
- UserProfileIncludeList
- UserProfileInfoEndpoint
- Endpoint for read-only access to user profile information.
- UserProfileModel
- DTO for transferring user profile information.
- UserProfileRepository
- UserProfiles
- Business logic for handling user profiles
- UserProfilesAdmin
- Admin operations complementing the end-user UserProfilesAdmin functionality.
- UserProfileTable
- UserProfileUpdateTable
Enums
- AuthStrategy
- Authentication strategies supported the Serverpod authentication core module
- UserProfileImageType
- Defines the format of stored user images.
Extensions
- AuthenticationInfoAuthUserId on AuthenticationInfo
-
AuthUserID extension forAuthenticationInfo - AuthenticationInfoJwt on AuthenticationInfo
-
Extensions for
AuthenticationInfowhen used with moduleserverpod_auth_jwt. - AuthenticationInfoServerSideSessionId on AuthenticationInfo
-
Server side session ID extension for
AuthenticationInfo. - AuthenticationInfoUserProfile on AuthenticationInfo
- Extensions method on the AuthenticationInfo to get the user profile.
- AuthServicesInit on Serverpod
- Extension to initialize the AuthServices with the default configuration.
- AuthSuccessJwtRefreshTokenId on AuthSuccess
- JWT refresh token ID extension for AuthSuccess.
- AuthSuccessServerSideSessionId on AuthSuccess
- Server side session ID extension for AuthSuccess.
- AuthUserScopes on AuthUserModel
- Scopes extension for AuthUserModel.
- JwtTokenInfoExtension on JwtTokenInfo
- Extensions for JwtTokenInfo.
- UserProfileToUserProfileData on UserProfile
- Extensions method to convert a UserProfile to its core data representation.
- UserProfileToUserProfileModel on UserProfile
- Extensions method to convert a UserProfile to its model.
Functions
-
defaultUserImageGenerator(
UserProfileModel userInfo, int imageSize) → Future< Image> - The default UserImageGenerator, mimics the default avatars used by Google.
Typedefs
-
AfterUserProfileCreatedHandler
= FutureOr<
void> Function(Session session, UserProfileModel userProfile, {required Transaction transaction}) - Callback to be invoked with the new user profile after it has been created.
-
AfterUserProfileUpdatedHandler
= FutureOr<
void> Function(Session session, UserProfileModel userProfile, {required Transaction transaction}) - Callback to be invoked with the updated user profile after it has been updated.
-
BeforeUserProfileCreatedHandler
= FutureOr<
UserProfileData> Function(Session session, UuidValue authUserId, UserProfileData userProfile, {required Transaction transaction}) - Callback to be invoked with the new user profile data before it gets created.
-
BeforeUserProfileUpdatedHandler
= FutureOr<
UserProfileData> Function(Session session, UuidValue authUserId, UserProfileData userProfile, {required Transaction transaction}) - Callback to be invoked with the new user profile before it will be updated.
- DeletedRefreshToken = ({UuidValue authUserId, UuidValue refreshTokenId})
- A tuple of (refresh token ID) representing a deleted refresh token.
- DeletedSession = ({UuidValue authUserId, UuidValue sessionId})
- A tuple of (auth user ID, session ID) representing a deleted session.
-
UserImageGenerator
= Future<
Image> Function(UserProfileModel userProfile, int imageSize) - Generates a default user image (avatar) for a user who hasn't uploaded a user image.
Exceptions / Errors
- AuthUserBlockedException
- Exception thrown when a user attempts to authenticate but their account is blocked.
- AuthUserNotFoundException
- Exception thrown when attempting to access an AuthUser that does not exist.
- PasswordNotFoundException
- Thrown when a requested password is missing from configuration.
- RefreshTokenExpiredException
- Exception thrown when attempting to use a refresh token that has expired.
- RefreshTokenExpiredServerException
- Exception thrown when a refresh token has expired.
- RefreshTokenInvalidSecretException
- Exception thrown when a refresh token rotation request has an invalid secret.
- RefreshTokenInvalidSecretServerException
- Exception thrown when a refresh token has an invalid secret.
- RefreshTokenMalformedException
- Exception thrown when a refresh token string is malformed or cannot be parsed.
- RefreshTokenMalformedServerException
- Exception thrown when a refresh token is malformed.
- RefreshTokenNotFoundException
- Exception thrown when a refresh token cannot be found in the database.
- RefreshTokenNotFoundServerException
- Exception thrown when a refresh token is not found.
- RefreshTokenServerException
- Base exception for all refresh token related errors.
- UserProfileNotFoundException
- Exception which is thrown when a user's profile could not be found.