Last active
August 29, 2015 14:27
-
-
Save rodionbykov/081d49c595760e9c0461 to your computer and use it in GitHub Desktop.
FW/1 REST API controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component accessors="true" { | |
property name="SecurityService"; | |
function init(fw){ | |
variables.fw = fw; | |
} | |
function login(rc){ | |
var jsondata = DeserializeJSON(GetHttpRequestData().content); | |
var user = VARIABLES.SecurityService.login(jsondata.login, jsondata.password); | |
variables.fw.renderData("json", user); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment