Sunday, 15 August 2010

c# - REST session workflow for creating users -



c# - REST session workflow for creating users -

i working on c# webapi/mvc project has rather big workflow process creating user , placing in required information. there 10 major steps involved, in technically take user hours fill out.

the first step takes standard basic info such username, password, email, name, address etc.

what after first step successful, send rest phone call create basic user in user table, , prepare session farther steps in when field filled out in next steps, automatically send ajax phone call , update field in database.

while sounds easy , simple in theory utilize of sessions, in mvc, want in webapi rest in rest supposed stateless.

has come across similar issues, , if recommend approach? options can think of are:

-ditch rest standard mvc process , leave webapi reads instead of writes write process inital creation of users/accounts.

-using authentication tokens? can handle process successfully?

-once user created, take username/password every rest phone call auth webapi? store user/password in mvc session , straight phone call api mvc, mobile applications store username/password in application , phone call webapi (i think appropriate)

can tell me if of options best practice, or have improve best practice/process these things? prefer write things 1 time cover web , mobile much possible rather having duplicate processes.

thanks in advance!!!

i consider modify regular webapi owin register flow.

collect basic user info , post web api via ajax. if succeeded - send owin token caller in http header. proceed steps user info updates (via http set example) , set token in authenticate header. mark webapi update procedure authorize attribute.

this blog post help setup webapi issue , take bearer tokens.

c# asp.net-mvc rest asp.net-web-api web-api

No comments:

Post a Comment