Skip to main content

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
TypeName
ServiceStack.IHasServiceStackProviderhasProvider
ServiceStack.AuthenticateAttributeauthAttr

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
TypeName
ServiceStack.IHasServiceStackProviderhasProvider
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
TypeName
ServiceStack.IHasServiceStackProviderprovider
Type Parameters
  • T