Class SessionResource

java.lang.Object
ch.software_atelier.simpleflex.rest.DefaultRestResource
ch.software_atelier.simpleflex.rest.auth.rres.SessionResource
All Implemented Interfaces:
ch.software_atelier.simpleflex.rest.RestResource

public class SessionResource extends ch.software_atelier.simpleflex.rest.DefaultRestResource
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    docPOST(ch.software_atelier.simpleflex.rest.swagger.MethodDocumentation request)
     
    void
    docPUT(ch.software_atelier.simpleflex.rest.swagger.MethodDocumentation request)
     
    ch.software_atelier.simpleflex.rest.RestResponse
    onPOST(ch.software_atelier.simpleflex.rest.RestRequest request)
    The Login function.
    ch.software_atelier.simpleflex.rest.RestResponse
    onPUT(ch.software_atelier.simpleflex.rest.RestRequest request)
    Updates the SessionToken.
    static org.json.JSONArray
     

    Methods inherited from class ch.software_atelier.simpleflex.rest.DefaultRestResource

    addSimplePropertie, docDELETE, docGET, docHEAD, docOPTIONS, docPATCH, onDELETE, onGET, onHEAD, onOPTIONS, onPATCH

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • onPUT

      public ch.software_atelier.simpleflex.rest.RestResponse onPUT(ch.software_atelier.simpleflex.rest.RestRequest request)
      Updates the SessionToken. No Data required.
      Specified by:
      onPUT in interface ch.software_atelier.simpleflex.rest.RestResource
      Overrides:
      onPUT in class ch.software_atelier.simpleflex.rest.DefaultRestResource
    • docPUT

      public void docPUT(ch.software_atelier.simpleflex.rest.swagger.MethodDocumentation request)
      Specified by:
      docPUT in interface ch.software_atelier.simpleflex.rest.RestResource
      Overrides:
      docPUT in class ch.software_atelier.simpleflex.rest.DefaultRestResource
    • onPOST

      public ch.software_atelier.simpleflex.rest.RestResponse onPOST(ch.software_atelier.simpleflex.rest.RestRequest request)
      The Login function. Creates a new Session. {"user":"username", "pass":"password"}
      Specified by:
      onPOST in interface ch.software_atelier.simpleflex.rest.RestResource
      Overrides:
      onPOST in class ch.software_atelier.simpleflex.rest.DefaultRestResource
    • docPOST

      public void docPOST(ch.software_atelier.simpleflex.rest.swagger.MethodDocumentation request)
      Specified by:
      docPOST in interface ch.software_atelier.simpleflex.rest.RestResource
      Overrides:
      docPOST in class ch.software_atelier.simpleflex.rest.DefaultRestResource
    • realmsToArray

      public static org.json.JSONArray realmsToArray(HashMap<String,String> realms) throws org.json.JSONException
      Throws:
      org.json.JSONException