ServiceStackProviderExtensions
Assembly: ServiceStack.dll
View Source
Declaration
public static class ServiceStackProviderExtensions
Methods
IsAuthorized(IHasServiceStackProvider, AuthenticateAttribute)
View Source
Declaration
public static bool IsAuthorized(this IHasServiceStackProvider hasProvider, AuthenticateAttribute authAttr)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.IHasServiceStackProvider | hasProvider |
ServiceStack.AuthenticateAttribute | authAttr |
HasAccess(IHasServiceStackProvider, ICollection<RequiredRoleAttribute>, ICollection<RequiresAnyRoleAttribute>, ICollection<RequiredPermissionAttribute>, ICollection<RequiresAnyPermissionAttribute>)
View Source
Declaration
public static bool HasAccess(this IHasServiceStackProvider hasProvider, ICollection<RequiredRoleAttribute> roleAttrs, ICollection<RequiresAnyRoleAttribute> anyRoleAttrs, ICollection<RequiredPermissionAttribute> permAttrs, ICollection<RequiresAnyPermissionAttribute> anyPermAttrs)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.IHasServiceStackProvider | hasProvider |
System.Collections.Generic.ICollection<ServiceStack.RequiredRoleAttribute> | roleAttrs |
System.Collections.Generic.ICollection<ServiceStack.RequiresAnyRoleAttribute> | anyRoleAttrs |
System.Collections.Generic.ICollection<ServiceStack.RequiredPermissionAttribute> | permAttrs |
System.Collections.Generic.ICollection<ServiceStack.RequiresAnyPermissionAttribute> | anyPermAttrs |
ResolveValidator<T>(IHasServiceStackProvider)
Resolve ServiceStack Validator in external ServiceStack provider class like ServiceStackController
View Source
Declaration
public static IValidator<T> ResolveValidator<T>(this IHasServiceStackProvider provider)
Returns
ServiceStack.FluentValidation.IValidator<T>
Parameters
Type | Name |
---|---|
ServiceStack.IHasServiceStackProvider | provider |
Type Parameters
T