Class SparkHttpActionAdapter

  • All Implemented Interfaces:
    org.pac4j.core.http.adapter.HttpActionAdapter<Object,​SparkWebContext>

    public class SparkHttpActionAdapter
    extends Object
    implements org.pac4j.core.http.adapter.HttpActionAdapter<Object,​SparkWebContext>
    Default HTTP action adapter.
    Since:
    1.1.0
    Author:
    Jerome Leleu, Marco Guenther
    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
      • service

        protected spark.Service service
    • Constructor Detail

      • SparkHttpActionAdapter

        public SparkHttpActionAdapter()
      • SparkHttpActionAdapter

        public SparkHttpActionAdapter​(spark.Service service)
    • Method Detail

      • adapt

        public Object adapt​(org.pac4j.core.exception.http.HttpAction action,
                            SparkWebContext context)
        Specified by:
        adapt in interface org.pac4j.core.http.adapter.HttpActionAdapter<Object,​SparkWebContext>
      • stop

        protected void stop​(int code,
                            String body)
        Immediately stop the request.
        Parameters:
        code - the HTTP action status code
        body - the HTTP action response body