بنقرة واحدة
servicestack-authentication
Implements authentication using ServiceStack Auth Providers and session handling.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Implements authentication using ServiceStack Auth Providers and session handling.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Designs stable, discoverable APIs using routes, metadata, and versioning conventions.
Applies role-, permission-, and ownership-based authorization using ServiceStack idioms.
Implements AutoQuery services, custom filters, and permission-aware querying.
Designs request/response DTOs using DTO-first, message-based ServiceStack conventions.
Controls OpenAPI / metadata exposure without compromising ServiceStack-first design.
Uses OrmLite via the implicit Db connection and understands transaction semantics and rollback behavior.
| name | servicestack-authentication |
| description | Implements authentication using ServiceStack Auth Providers and session handling. |
ServiceStack provides a robust authentication system that supports multiple providers (Credentials, JWT, OAuth, etc.).
Authentication is enabled by registering the AuthFeature in AppHost.Configure.
Plugins.Add(new AuthFeature(() => new AuthUserSession(),
new IAuthProvider[] {
new CredentialsAuthProvider(), // Enable email/password login
new JwtAuthProvider(AppSettings) { ... } // Enable JWT
}));
A persistence layer (IAuthRepository) is required to store user accounts.
container.Register<IAuthRepository>(c =>
new OrmLiteAuthRepository(c.Resolve<IDbConnectionFactory>()));
Apply the [Authenticate] attribute to Service classes or Request DTOs.
[Authenticate]
public class MySecureRequest : IReturn<MyResponse> { ... }
Inside a Service, use GetSession() or the SessionBag.
var session = GetSession();
var userId = session.UserAuthId;
AuthUserSession if you need to store additional data in the user session.