reeplace cerberos by thalos
This commit is contained in:
		
							
								
								
									
										19
									
								
								Core.Thalos.BuildingBlocks/Contracts/ITokenProvider.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								Core.Thalos.BuildingBlocks/Contracts/ITokenProvider.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| // *********************************************************************** | ||||
| // <copyright file="ITokenProvider.cs"> | ||||
| //     AgileWebs | ||||
| // </copyright> | ||||
| // *********************************************************************** | ||||
|  | ||||
| namespace Core.Thalos.Adapters.Contracts | ||||
| { | ||||
|     /// <summary> | ||||
|     /// Interface for token provider. | ||||
|     /// </summary> | ||||
|     public interface ITokenProvider | ||||
|     { | ||||
|         /// <summary> | ||||
|         /// Get token from headers. | ||||
|         /// </summary> | ||||
|         string GetToken(); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										32
									
								
								Core.Thalos.BuildingBlocks/Contracts/ITokenService.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								Core.Thalos.BuildingBlocks/Contracts/ITokenService.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | ||||
| // *********************************************************************** | ||||
| // <copyright file="ITokenService.cs"> | ||||
| //     AgileWebs | ||||
| // </copyright> | ||||
| // *********************************************************************** | ||||
|  | ||||
| using Microsoft.AspNetCore.Http; | ||||
| using Microsoft.AspNetCore.Mvc; | ||||
|  | ||||
| namespace Core.Thalos.Adapters.Contracts | ||||
| { | ||||
|     /// <summary> | ||||
|     /// Interface for authenticacion service. | ||||
|     /// </summary> | ||||
|     public interface ITokenService | ||||
|     { | ||||
|         /// <summary> | ||||
|         /// Refreshes the access token. | ||||
|         /// </summary> | ||||
|         (string, IEnumerable<ModuleAdapter>) GenerateAccessToken(TokenAdapter adapter); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Refreshes the access token. | ||||
|         /// </summary> | ||||
|         IActionResult RefreshAccessToken(HttpContext context, TokenAdapter adapter); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Extracts the user email claim from the http context. | ||||
|         /// </summary> | ||||
|         string GetEmailClaim(HttpContext httpContext); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Sergio Matias Urquin
					Sergio Matias Urquin