Skip to content

Instantly share code, notes, and snippets.

View IcodeNet's full-sized avatar
😀

Byron Thanopoulos IcodeNet

😀
View GitHub Profile
@IcodeNet
IcodeNet / MVC SS
Created October 10, 2012 07:06
Oauth and SS
Mvc 3.0 project that hosts my Services using Service stack
Same MVc 3.0 project that holds my controllers responsible for generating the Request Token and Access Token for Oauth authentication
In the same MVC project I have an AccountController that my secure services are directed to its “login” action through [Authenticate(HtmlRedirect = "/account/login")]
Currently the RequestTokenController returns a hard coded “code” for all requests and the AccessTokenController a hardcoded “access_code”
They achieve this through simple redirection to the redirect_uri which is <baseURL>/auth/<provider>
As in the following
Response.Redirect(redirect_uri + "?code=4512391789087");
@IcodeNet
IcodeNet / Umbraco Razor Script Retrieve CheckBox List Selected Values
Created May 1, 2012 10:13
Umbraco Razor Script Retrieve CheckBox List Selected Values
var optionList = DynamicModel.TypeOfRoom; // TypeOfRoom is the check-box List
//Multiple Checkboxes selected
if (DynamicModel.TypeOfRoom.GetType() == typeof(Umbraco.Framework.Dynamics.BendyObject)){
var options = DynamicModel.TypeOfRoom.__KeyedChildren;
foreach(var kv in options){
RoomType is -- > @kv.Value
}
}