-
Notifications
You must be signed in to change notification settings - Fork 0
/
SamlController.java
40 lines (33 loc) · 1.32 KB
/
SamlController.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package org.appng.application.authentication.saml;
import org.appng.api.model.Site;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
/**
* <a href= "https://learn.microsoft.com/de-de/azure/active-directory/fundamentals/auth-saml"><img src=
* "https://learn.microsoft.com/de-de/azure/active-directory/fundamentals/media/authentication-patterns/saml-auth.png"
* /></a>
*/
@RestController
public class SamlController {
private @Autowired Site site;
@GetMapping("/saml/sign-on")
@PostMapping("/saml/sign-on")
public ResponseEntity<String> signOn(@RequestBody String payload) {
return new ResponseEntity<>(payload, HttpStatus.OK);
}
@GetMapping("/saml/logout")
@PostMapping("/saml/logout")
public ResponseEntity<String> logout(@RequestBody String payload) {
return new ResponseEntity<>(payload, HttpStatus.OK);
}
@GetMapping("/saml")
@PostMapping("/saml")
public ResponseEntity<String> reply(@RequestBody String payload) {
return new ResponseEntity<>(payload, HttpStatus.OK);
}
}