Implement server (#3)
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			Use Actix as HTTP service Reviewed-on: #3
This commit is contained in:
		
							
								
								
									
										41
									
								
								templates/base_page.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								templates/base_page.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
<!doctype html>
 | 
			
		||||
<html lang="en" class="h-100" data-bs-theme="auto">
 | 
			
		||||
<head>
 | 
			
		||||
 | 
			
		||||
  <meta charset="utf-8">
 | 
			
		||||
  <meta name="viewport" content="width=device-width, initial-scale=1">
 | 
			
		||||
  <meta name="description" content="OIDC basic test client">
 | 
			
		||||
  <meta name="author" content="Pierre HUBERT">
 | 
			
		||||
  <title>OIDC Test client</title>
 | 
			
		||||
 | 
			
		||||
  <link href="/assets/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
 | 
			
		||||
  <link href="/assets/cover.css" rel="stylesheet" />
 | 
			
		||||
 | 
			
		||||
  <meta name="theme-color" content="#712cf9">
 | 
			
		||||
 | 
			
		||||
</head>
 | 
			
		||||
<body class="d-flex h-100 text-center text-bg-dark">
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column">
 | 
			
		||||
  <header class="mb-auto">
 | 
			
		||||
    <div>
 | 
			
		||||
      <h3 class="float-md-start mb-0">OIDC test client</h3>
 | 
			
		||||
 | 
			
		||||
    </div>
 | 
			
		||||
  </header>
 | 
			
		||||
 | 
			
		||||
  <main class="px-3">
 | 
			
		||||
    {% block content %}
 | 
			
		||||
    TO_REPLACE
 | 
			
		||||
    {% endblock content %}
 | 
			
		||||
  </main>
 | 
			
		||||
 | 
			
		||||
  <footer class="mt-auto text-white-50">
 | 
			
		||||
    <p>© Pierre HUBERT</p>
 | 
			
		||||
  </footer>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										9
									
								
								templates/error.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								templates/error.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
{% extends "base_page.html" %}
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
<div class="alert alert-danger" role="alert">
 | 
			
		||||
  {{ message }}
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<a class="btn btn-primary" href="/start" role="button">Start again</a>
 | 
			
		||||
{% endblock content %}
 | 
			
		||||
							
								
								
									
										11
									
								
								templates/home.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								templates/home.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
{% extends "base_page.html" %}
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
<h1>Test OIDC Authentication flow.</h1>
 | 
			
		||||
<p class="lead">Get started testing OIDC authentication flow</p>
 | 
			
		||||
<p>Redirect URI: {{ redirect_url }}</p>
 | 
			
		||||
<p class="lead">
 | 
			
		||||
    <a href="/start" class="btn btn-lg btn-light fw-bold border-white bg-white">Start</a>
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
{% endblock content %}
 | 
			
		||||
							
								
								
									
										30
									
								
								templates/result.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								templates/result.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
{% extends "base_page.html" %}
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
<style>
 | 
			
		||||
    .card {
 | 
			
		||||
        text-align: left;
 | 
			
		||||
        margin-bottom: 20px;
 | 
			
		||||
    }
 | 
			
		||||
</style>
 | 
			
		||||
 | 
			
		||||
<div class="alert alert-success" role="alert">
 | 
			
		||||
    Login successful
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div class="card">
 | 
			
		||||
    <div class="card-body">
 | 
			
		||||
        <h5 class="card-title">Token response</h5>
 | 
			
		||||
        <pre class="card-text">{{ token }}</pre>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div class="card">
 | 
			
		||||
    <div class="card-body">
 | 
			
		||||
        <h5 class="card-title">User info</h5>
 | 
			
		||||
        <pre class="card-text">{{ user_info }}</pre>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<a class="btn btn-primary" href="/start" role="button">Start again</a>
 | 
			
		||||
{% endblock content %}
 | 
			
		||||
		Reference in New Issue
	
	Block a user