Skip to content

Instantly share code, notes, and snippets.

View steff-mueller's full-sized avatar

Steffen Müller steff-mueller

View GitHub Profile
@steff-mueller
steff-mueller / Example.cs
Created January 2, 2012 13:52
ServiceStack improvement
[RestService("/users", Verbs = "POST, GET")]
public class User
{
...
}
public class UserResponse
{
...
}
@steff-mueller
steff-mueller / Tutorial.markdown
Created December 26, 2011 11:24
Authentication and authorization in ServiceStack
@steff-mueller
steff-mueller / Tutorial.markdown
Created December 23, 2011 14:06
Servicestack - Validation of request dtos

This feature is now included in the latest release of ServiceStack and the up-to-date documentation can be found here: https://github.com/ServiceStack/ServiceStack/wiki/Validation

FluentValidation for request dtos

First in the app host the validation mechanism must be initialized:

ValidationHandler.Init(this);

This request dto should be validated:

@steff-mueller
steff-mueller / ExampleRequest.cs
Created December 21, 2011 17:29
ServiceStack - Permission based authorization
//Example usage of these attributes:
[Authenticate]
[RequiredPermission("CanInspectTweets")]
[RequiredPermissionOnPost("CanAddTweets")]
[RequiredPermissionOnPut("CanAddTweets")]
[RequiredPermissionOnDelete("CanRemoveTweets")]
[RestService("/tweets",)]
public class Tweet { ... }