regist servicestack without permission?

55 Views Asked by At

i can regist servicestack register service like

 var responseX =
                    client.Post(new Register
                    {

                        UserName = sicil.Text,
                        Password = Password.Text,
                        FirstName = adX.Text,
                        LastName = soyadX.Text,
                        Email = sicil.Text,
                        AutoLogin = false,
                        Continue = "",
                        DisplayName =adX.Text+ " "+ soyadX.Text
                    });

and also i can register from rest services, but i want only auth users can register or apply

is there something way to

[Auth] Register

thanks

1

There are 1 best solutions below

2
On

You can dynamically add attributes to any Type or Property in ServiceStack with the runtime attribute API which lets you modify the attributes of any built-in Services, e.g:

typeof(Register)
    .AddAttributes(new AuthenticateAttribute());