Skip to content

Commit

Permalink
chore: add index with test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Bjorn Molin <[email protected]>
  • Loading branch information
bjornmolin committed Jan 17, 2025
1 parent c898728 commit 0113943
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package se.digg.eudiw.issuer_tests.controllers;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Controller
public class TestIndexController {

@GetMapping("/test-index")
public String testIndex(Model model) {

List<String> testCases = List.of("start-test-1-authorisation-flow", "start-test-2-pre-authorisation-flow", "start-test-3-par");
model.addAttribute("testCases", testCases);
return "test-index";
}
}
3 changes: 2 additions & 1 deletion src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ spring:
eudiw:
issuerBaseUrl: https://local.dev.swedenconnect.se:9090
credentialHost: https://local.dev.swedenconnect.se:9090
clientId: eudiw-client
clientId: 1234567890
# eudiw-client
testServerBaseUrl: https://local.dev.swedenconnect.se:9443
2 changes: 2 additions & 0 deletions src/main/resources/templates/auth-flow.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
</head>
<body>
<h1>Auth flow</h1>

<a href="test-index">test index</a>
</body>
</html>
8 changes: 8 additions & 0 deletions src/main/resources/templates/callback-demo-auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ <h2>Issue credential</h2>
}
/*]]>*/
</script>

<p>
<a href="start-test-1-authorisation-flow">start-test-1-authorisation-flow</a>
</p>
<p>
<a href="test-index">test index</a>
</p>

</body>
</html>

1 change: 1 addition & 0 deletions src/main/resources/templates/pre-auth-flow.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
</head>
<body>
<h1>Pre-auth flow</h1>
<a href="test-index">test index</a>
</body>
</html>
14 changes: 14 additions & 0 deletions src/main/resources/templates/test-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Getting Started: Serving Web Content</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<ol>
<li th:each="testCase: ${testCases}">
<a th:href="${testCase}" th:text="|${testCase}|"/>
</li>
</ol>
</body>
</html>

0 comments on commit 0113943

Please sign in to comment.