java.lang.Object
info.ejava.examples.svc.authn.authcfg.controllers.HelloController
@RestController
public class HelloController
extends Object
-
Constructor Summary
Constructors
-
Method Summary
getHello(String name,
org.springframework.security.core.userdetails.UserDetails user)
postHello(String name,
org.springframework.security.core.userdetails.UserDetails user)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
HelloController
public HelloController()
-
Method Details
-
getHello
@RequestMapping(path="/api/anonymous/hello",
method=GET)
public String getHello(@RequestParam(name="name",defaultValue="you",required=false)
String name,
@AuthenticationPrincipal
org.springframework.security.core.userdetails.UserDetails user)
-
postHello
@RequestMapping(path="/api/anonymous/hello",
method=POST,
consumes="text/plain",
produces="text/plain")
public String postHello(@RequestBody
String name,
@AuthenticationPrincipal
org.springframework.security.core.userdetails.UserDetails user)
-
getHelloAuthn
@RequestMapping(path="/api/authn/hello",
method=GET)
public String getHelloAuthn(@RequestParam(name="name",defaultValue="you",required=false)
String name,
@AuthenticationPrincipal
org.springframework.security.core.userdetails.UserDetails user)
-
postHelloAuthn
@RequestMapping(path="/api/authn/hello",
method=POST,
consumes="text/plain",
produces="text/plain")
public String postHelloAuthn(@RequestBody
String name,
@AuthenticationPrincipal
org.springframework.security.core.userdetails.UserDetails user)
-
getHelloAlt
@RequestMapping(path="/api/alt/hello",
method=GET)
public String getHelloAlt(@RequestParam(name="name",defaultValue="you",required=false)
String name)
-
postHelloAlt
@RequestMapping(path="/api/alt/hello",
method=POST,
consumes="text/plain",
produces="text/plain")
public String postHelloAlt(@RequestBody
String name)