c# 4.0 - Self Hosted Web API Authentication -


i have self hosted web api running, using dotnetopenauth issue authorization tokens. basically, project consists of 2 apicontroller endpoints (authorize , token). force client have log in form, prior being able call either endpoint. (forms authentication guess). however, doesn't seem works self hosted web api projects, so, trying implement myself.

as of now, when user calls authorize web method, render login page , force them login. however, have mechanism in place once user logs in, can send cookie response. understand if write cookie in response, browser automatically send relevant cookies upon subsequent requests.

however, test client uses httpwebrequest call web api. have build mechanism save response cookie file on hard disk, , then, read back, , associate httpwebrequest on subsequent requests? or , there built framework can leverage (just how browser automatically take care of me).

i figured once figure part out, extend authorizationfilterattribute, , use check validity of incoming cookie.

thanks. or suggestion appreciated!


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -