Class AuthenticationRestController

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    @RequestMapping("/api/authn")
    @RestController
    public class AuthenticationRestController
    extends Object
    implements org.springframework.beans.factory.InitializingBean
    Rest controller that handles authentication on the REST API together with the Spring Security filters configured in WebSecurityConfiguration
    Author:
    Frederic Van Reet (frederic dot vanreet at atmire dot com), Tom Desair (tom dot desair at atmire dot com)
    • Constructor Detail

      • AuthenticationRestController

        public AuthenticationRestController()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • authn

        @RequestMapping(method=GET)
        public AuthnResource authn()
      • login

        @RequestMapping(value="/login",
                        method=POST)
        public org.springframework.http.ResponseEntity login​(javax.servlet.http.HttpServletRequest request,
                                                             @RequestParam(name="user",required=false)
                                                             String user,
                                                             @RequestParam(name="password",required=false)
                                                             String password)
      • login

        @RequestMapping(value="/login",
                        method={GET,PUT,PATCH,DELETE})
        public org.springframework.http.ResponseEntity login()
      • logout

        @RequestMapping(value="/logout",
                        method={GET,POST})
        public org.springframework.http.ResponseEntity logout()
      • getLoginResponse

        protected org.springframework.http.ResponseEntity getLoginResponse​(javax.servlet.http.HttpServletRequest request,
                                                                           String failedMessage)