08-07-2009 06:34 AM
<webscript>
<shortname>Extended Login</shortname>
<description>Establish a ticket</description>
<url>/api/login?u={username}&pw={password?}</url>
<format default="json"/>
<authentication>none</authentication>
<transaction allow="readonly">required</transaction>
<lifecycle>public_api</lifecycle>
<family>Authentication</family>
</webscript>
{
<#if ticket?exists && ticket!="">
"success":"yes",
"data": {
"ticket":"${ticket}"
}
<#else>
"success":"no",
"errors": {
"reason":"Invalid username/password!"
}
</#if>
}
08-07-2009 12:22 PM
{
"data":
{
<#if ticket?exists>
"success":"yes"
"ticket":"${jsonUtils.encodeJSONString(ticket)}"
<#else>
"success":"no"
"ticket":"empty"
</#if>
}
}
{
"data":
{
"success":"yes"
"ticket":"${jsonUtils.encodeJSONString(ticket)}"
}
}
{ "status" : { "code" : 403, "name" : "Forbidden", "description" : "Server understood the request but refused to fulfill it." }, "message" : "07070020 Login failed", "exception" : "org.alfresco.web.scripts.WebScriptException - 07070020 Login failed", "callstack" : [ "" ,"org.alfresco.web.scripts.WebScriptException: 07070020 Login failed" ,"org.alfresco.repo.web.scripts.bean.AbstractLoginBean.login(AbstractLoginBean.java:81)" ,"org.alfresco.repo.web.scripts.bean.Login.executeImpl(Login.java:64)" ,"org.alfresco.web.scripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:223)" ,"org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:70)" ,"org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:357)" ,"org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:326)" ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:407)" ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:424)" ,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:253)" ,"org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:262)" ,"org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)" ,"org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:122)" ,"javax.servlet.http.HttpServlet.service(HttpServlet.java:717)" ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)" ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)" ,"org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)" ,"org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)" ,"org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)" ,"org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)" ,"org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)" ,"org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)" ,"org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)" ,"org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)" ,"org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)" ,"java.lang.Thread.run(Thread.java:619)" ], "server" : "Alfresco Community v3.2.0 (2039) schema 2.019", "time" : "7/Ago/2009 17:16:40" }
{
"data":
{
"success":"no"
"ticket":"empty"
}
}
as it's define in my code…Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.