├── AuthenticationService C# ├── AuthenticationService.sln ├── AuthenticationService │ ├── App.config │ ├── AuthenticationService.csproj │ ├── Managers │ │ ├── IAuthService.cs │ │ └── JWTService.cs │ ├── Models │ │ ├── IAuthContainerModel.cs │ │ └── JWTContainerModel.cs │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── AuthenticationService.exe │ │ │ ├── AuthenticationService.exe.config │ │ │ ├── AuthenticationService.pdb │ │ │ ├── Microsoft.IdentityModel.JsonWebTokens.dll │ │ │ ├── Microsoft.IdentityModel.JsonWebTokens.pdb │ │ │ ├── Microsoft.IdentityModel.JsonWebTokens.xml │ │ │ ├── Microsoft.IdentityModel.Logging.dll │ │ │ ├── Microsoft.IdentityModel.Logging.pdb │ │ │ ├── Microsoft.IdentityModel.Logging.xml │ │ │ ├── Microsoft.IdentityModel.Tokens.dll │ │ │ ├── Microsoft.IdentityModel.Tokens.pdb │ │ │ ├── Microsoft.IdentityModel.Tokens.xml │ │ │ ├── Newtonsoft.Json.dll │ │ │ ├── Newtonsoft.Json.xml │ │ │ ├── System.IdentityModel.Tokens.Jwt.dll │ │ │ ├── System.IdentityModel.Tokens.Jwt.pdb │ │ │ └── System.IdentityModel.Tokens.Jwt.xml │ ├── obj │ │ └── Debug │ │ │ ├── AuthenticationService.csproj.CopyComplete │ │ │ ├── AuthenticationService.csproj.CoreCompileInputs.cache │ │ │ ├── AuthenticationService.csproj.FileListAbsolute.txt │ │ │ ├── AuthenticationService.csprojAssemblyReference.cache │ │ │ ├── AuthenticationService.exe │ │ │ ├── AuthenticationService.pdb │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ └── packages.config └── packages │ ├── Microsoft.IdentityModel.JsonWebTokens.5.2.4 │ ├── .signature.p7s │ ├── Microsoft.IdentityModel.JsonWebTokens.5.2.4.nupkg │ └── lib │ │ ├── net45 │ │ ├── Microsoft.IdentityModel.JsonWebTokens.dll │ │ ├── Microsoft.IdentityModel.JsonWebTokens.pdb │ │ └── Microsoft.IdentityModel.JsonWebTokens.xml │ │ ├── net451 │ │ ├── Microsoft.IdentityModel.JsonWebTokens.dll │ │ ├── Microsoft.IdentityModel.JsonWebTokens.pdb │ │ └── Microsoft.IdentityModel.JsonWebTokens.xml │ │ └── netstandard1.4 │ │ ├── Microsoft.IdentityModel.JsonWebTokens.dll │ │ ├── Microsoft.IdentityModel.JsonWebTokens.pdb │ │ └── Microsoft.IdentityModel.JsonWebTokens.xml │ ├── Microsoft.IdentityModel.Logging.5.2.4 │ ├── .signature.p7s │ ├── Microsoft.IdentityModel.Logging.5.2.4.nupkg │ └── lib │ │ ├── net45 │ │ ├── Microsoft.IdentityModel.Logging.dll │ │ ├── Microsoft.IdentityModel.Logging.pdb │ │ └── Microsoft.IdentityModel.Logging.xml │ │ ├── net451 │ │ ├── Microsoft.IdentityModel.Logging.dll │ │ ├── Microsoft.IdentityModel.Logging.pdb │ │ └── Microsoft.IdentityModel.Logging.xml │ │ └── netstandard1.4 │ │ ├── Microsoft.IdentityModel.Logging.dll │ │ ├── Microsoft.IdentityModel.Logging.pdb │ │ └── Microsoft.IdentityModel.Logging.xml │ ├── Microsoft.IdentityModel.Tokens.5.2.4 │ ├── .signature.p7s │ ├── Microsoft.IdentityModel.Tokens.5.2.4.nupkg │ └── lib │ │ ├── net45 │ │ ├── Microsoft.IdentityModel.Tokens.dll │ │ ├── Microsoft.IdentityModel.Tokens.pdb │ │ └── Microsoft.IdentityModel.Tokens.xml │ │ ├── net451 │ │ ├── Microsoft.IdentityModel.Tokens.dll │ │ ├── Microsoft.IdentityModel.Tokens.pdb │ │ └── Microsoft.IdentityModel.Tokens.xml │ │ └── netstandard1.4 │ │ ├── Microsoft.IdentityModel.Tokens.dll │ │ ├── Microsoft.IdentityModel.Tokens.pdb │ │ └── Microsoft.IdentityModel.Tokens.xml │ ├── Newtonsoft.Json.10.0.1 │ ├── Newtonsoft.Json.10.0.1.nupkg │ ├── lib │ │ ├── net20 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── net35 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── net40 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── net45 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── netstandard1.0 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── netstandard1.3 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ └── portable-net45+win8+wpa81+wp8 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ └── tools │ │ └── install.ps1 │ └── System.IdentityModel.Tokens.Jwt.5.2.4 │ ├── .signature.p7s │ ├── System.IdentityModel.Tokens.Jwt.5.2.4.nupkg │ └── lib │ ├── net45 │ ├── System.IdentityModel.Tokens.Jwt.dll │ ├── System.IdentityModel.Tokens.Jwt.pdb │ └── System.IdentityModel.Tokens.Jwt.xml │ ├── net451 │ ├── System.IdentityModel.Tokens.Jwt.dll │ ├── System.IdentityModel.Tokens.Jwt.pdb │ └── System.IdentityModel.Tokens.Jwt.xml │ └── netstandard1.4 │ ├── System.IdentityModel.Tokens.Jwt.dll │ ├── System.IdentityModel.Tokens.Jwt.pdb │ └── System.IdentityModel.Tokens.Jwt.xml ├── AuthenticationService NodeJS ├── JWTService.js ├── Main.js └── package.json └── README.md /AuthenticationService C#/AuthenticationService.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.2019 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationService", "AuthenticationService\AuthenticationService.csproj", "{9CA20F5C-6F6A-47F6-9C74-38EEC112A295}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {9CA20F5C-6F6A-47F6-9C74-38EEC112A295}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {9CA20F5C-6F6A-47F6-9C74-38EEC112A295}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {9CA20F5C-6F6A-47F6-9C74-38EEC112A295}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {9CA20F5C-6F6A-47F6-9C74-38EEC112A295}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {CF278CD7-9441-4709-9210-C7AA273D0627} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/AuthenticationService.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {9CA20F5C-6F6A-47F6-9C74-38EEC112A295} 8 | Exe 9 | AuthenticationService 10 | AuthenticationService 11 | v4.6.1 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | ..\packages\Microsoft.IdentityModel.JsonWebTokens.5.2.4\lib\net451\Microsoft.IdentityModel.JsonWebTokens.dll 38 | 39 | 40 | ..\packages\Microsoft.IdentityModel.Logging.5.2.4\lib\net451\Microsoft.IdentityModel.Logging.dll 41 | 42 | 43 | ..\packages\Microsoft.IdentityModel.Tokens.5.2.4\lib\net451\Microsoft.IdentityModel.Tokens.dll 44 | 45 | 46 | ..\packages\Newtonsoft.Json.10.0.1\lib\net45\Newtonsoft.Json.dll 47 | 48 | 49 | 50 | 51 | ..\packages\System.IdentityModel.Tokens.Jwt.5.2.4\lib\net451\System.IdentityModel.Tokens.Jwt.dll 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/Managers/IAuthService.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Claims; 2 | using System.Collections.Generic; 3 | using AuthenticationService.Models; 4 | 5 | namespace AuthenticationService.Managers 6 | { 7 | public interface IAuthService 8 | { 9 | string SecretKey { get; set; } 10 | 11 | bool IsTokenValid(string token); 12 | string GenerateToken(IAuthContainerModel model); 13 | IEnumerable GetTokenClaims(string token); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/Managers/JWTService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Claims; 3 | using System.Collections.Generic; 4 | using AuthenticationService.Models; 5 | using Microsoft.IdentityModel.Tokens; 6 | using System.IdentityModel.Tokens.Jwt; 7 | 8 | namespace AuthenticationService.Managers 9 | { 10 | public class JWTService : IAuthService 11 | { 12 | #region Members 13 | /// 14 | /// The secret key we use to encrypt out token with. 15 | /// 16 | public string SecretKey { get; set; } 17 | #endregion 18 | 19 | #region Constructor 20 | public JWTService(string secretKey) 21 | { 22 | SecretKey = secretKey; 23 | } 24 | #endregion 25 | 26 | #region Public Methods 27 | /// 28 | /// Validates whether a given token is valid or not, and returns true in case the token is valid otherwise it will return false; 29 | /// 30 | /// 31 | /// 32 | public bool IsTokenValid(string token) 33 | { 34 | if (string.IsNullOrEmpty(token)) 35 | throw new ArgumentException("Given token is null or empty."); 36 | 37 | TokenValidationParameters tokenValidationParameters = GetTokenValidationParameters(); 38 | 39 | JwtSecurityTokenHandler jwtSecurityTokenHandler = new JwtSecurityTokenHandler(); 40 | try 41 | { 42 | ClaimsPrincipal tokenValid = jwtSecurityTokenHandler.ValidateToken(token, tokenValidationParameters, out SecurityToken validatedToken); 43 | return true; 44 | } 45 | catch (Exception) 46 | { 47 | return false; 48 | } 49 | } 50 | 51 | /// 52 | /// Generates token by given model. 53 | /// Validates whether the given model is valid, then gets the symmetric key. 54 | /// Encrypt the token and returns it. 55 | /// 56 | /// 57 | /// Generated token. 58 | public string GenerateToken(IAuthContainerModel model) 59 | { 60 | if (model == null || model.Claims == null || model.Claims.Length == 0) 61 | throw new ArgumentException("Arguments to create token are not valid."); 62 | 63 | SecurityTokenDescriptor securityTokenDescriptor = new SecurityTokenDescriptor 64 | { 65 | Subject = new ClaimsIdentity(model.Claims), 66 | Expires = DateTime.UtcNow.AddMinutes(Convert.ToInt32(model.ExpireMinutes)), 67 | SigningCredentials = new SigningCredentials(GetSymmetricSecurityKey(), model.SecurityAlgorithm) 68 | }; 69 | 70 | JwtSecurityTokenHandler jwtSecurityTokenHandler = new JwtSecurityTokenHandler(); 71 | SecurityToken securityToken = jwtSecurityTokenHandler.CreateToken(securityTokenDescriptor); 72 | string token = jwtSecurityTokenHandler.WriteToken(securityToken); 73 | 74 | return token; 75 | } 76 | 77 | /// 78 | /// Receives the claims of token by given token as string. 79 | /// 80 | /// 81 | /// Pay attention, one the token is FAKE the method will throw an exception. 82 | /// 83 | /// 84 | /// IEnumerable of claims for the given token. 85 | public IEnumerable GetTokenClaims(string token) 86 | { 87 | if (string.IsNullOrEmpty(token)) 88 | throw new ArgumentException("Given token is null or empty."); 89 | 90 | TokenValidationParameters tokenValidationParameters = GetTokenValidationParameters(); 91 | 92 | JwtSecurityTokenHandler jwtSecurityTokenHandler = new JwtSecurityTokenHandler(); 93 | try 94 | { 95 | ClaimsPrincipal tokenValid = jwtSecurityTokenHandler.ValidateToken(token, tokenValidationParameters, out SecurityToken validatedToken); 96 | return tokenValid.Claims; 97 | } 98 | catch (Exception ex) 99 | { 100 | throw ex; 101 | } 102 | } 103 | #endregion 104 | 105 | #region Private Methods 106 | private SecurityKey GetSymmetricSecurityKey() 107 | { 108 | byte[] symmetricKey = Convert.FromBase64String(SecretKey); 109 | return new SymmetricSecurityKey(symmetricKey); 110 | } 111 | 112 | private TokenValidationParameters GetTokenValidationParameters() 113 | { 114 | return new TokenValidationParameters() 115 | { 116 | ValidateIssuer = false, 117 | ValidateAudience = false, 118 | IssuerSigningKey = GetSymmetricSecurityKey() 119 | }; 120 | } 121 | #endregion 122 | } 123 | } -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/Models/IAuthContainerModel.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Claims; 2 | 3 | namespace AuthenticationService.Models 4 | { 5 | public interface IAuthContainerModel 6 | { 7 | #region Members 8 | string SecretKey { get; set; } 9 | string SecurityAlgorithm { get; set; } 10 | int ExpireMinutes { get; set; } 11 | 12 | Claim[] Claims { get; set; } 13 | #endregion 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/Models/JWTContainerModel.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Claims; 2 | using Microsoft.IdentityModel.Tokens; 3 | 4 | namespace AuthenticationService.Models 5 | { 6 | public class JWTContainerModel : IAuthContainerModel 7 | { 8 | #region Public Methods 9 | public int ExpireMinutes { get; set; } = 10080; // 7 days. 10 | public string SecretKey { get; set; } = "TW9zaGVFcmV6UHJpdmF0ZUtleQ=="; // This secret key should be moved to some configurations outter server. 11 | public string SecurityAlgorithm { get; set; } = SecurityAlgorithms.HmacSha256Signature; 12 | 13 | public Claim[] Claims { get; set; } 14 | #endregion 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Security.Claims; 4 | using System.Collections.Generic; 5 | using AuthenticationService.Models; 6 | using AuthenticationService.Managers; 7 | 8 | namespace AuthenticationService 9 | { 10 | class Program 11 | { 12 | static void Main(string[] args) 13 | { 14 | IAuthContainerModel model = GetJWTContainerModel("Moshe Binieli", "mmoshikoo@gmail.com"); 15 | IAuthService authService = new JWTService(model.SecretKey); 16 | 17 | string token = authService.GenerateToken(model); 18 | 19 | if (!authService.IsTokenValid(token)) 20 | throw new UnauthorizedAccessException(); 21 | else 22 | { 23 | List claims = authService.GetTokenClaims(token).ToList(); 24 | 25 | Console.WriteLine(claims.FirstOrDefault(e => e.Type.Equals(ClaimTypes.Name)).Value); 26 | Console.WriteLine(claims.FirstOrDefault(e => e.Type.Equals(ClaimTypes.Email)).Value); 27 | } 28 | } 29 | 30 | #region Private Methods 31 | private static JWTContainerModel GetJWTContainerModel(string name, string email) 32 | { 33 | return new JWTContainerModel() 34 | { 35 | Claims = new Claim[] 36 | { 37 | new Claim(ClaimTypes.Name, name), 38 | new Claim(ClaimTypes.Email, email) 39 | } 40 | }; 41 | } 42 | #endregion 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("AuthenticationService")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("AuthenticationService")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9ca20f5c-6f6a-47f6-9c74-38eec112a295")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/AuthenticationService.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/bin/Debug/AuthenticationService.exe -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/AuthenticationService.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/AuthenticationService.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/bin/Debug/AuthenticationService.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.JsonWebTokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.JsonWebTokens.dll -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.JsonWebTokens.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.JsonWebTokens.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.JsonWebTokens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.IdentityModel.JsonWebTokens 5 | 6 | 7 | 8 | 9 | Constants for Json Web tokens. 10 | 11 | 12 | 13 | 14 | A URI that represents the JSON XML data type. 15 | 16 | When mapping json to .Net Claim(s), if the value was not a string (or an enumeration of strings), the ClaimValue will serialized using the current JSON serializer, a property will be added with the .Net type and the ClaimTypeValue will be set to 'JsonClaimValueType'. 17 | 18 | 19 | 20 | A URI that represents the JSON array XML data type. 21 | 22 | When mapping json to .Net Claim(s), if the value was not a string (or an enumeration of strings), the ClaimValue will serialized using the current JSON serializer, a property will be added with the .Net type and the ClaimTypeValue will be set to 'JsonClaimValueType'. 23 | 24 | 25 | 26 | A URI that represents the JSON null data type 27 | 28 | When mapping json to .Net Claim(s), we use empty string to represent the claim value and set the ClaimValueType to JsonNull 29 | 30 | 31 | 32 | A designed for representing a JSON Web Token (JWT). 33 | Currently only supports tokens in JWS format. 34 | 35 | 36 | 37 | 38 | Initializes a new instance of from a string in JWS Compact serialized format. 39 | 40 | A JSON Web Token that has been serialized in JWS Compact serialized format. 41 | 'jwtEncodedString' is null or empty. 42 | 'jwtEncodedString' is not in JWS Compact serialized format. 43 | 44 | The contents of the returned have not been validated, the JSON Web Token is simply decoded. Validation can be accomplished using the validation methods in 45 | 46 | 47 | 48 | 49 | Initializes a new instance of the class where the header contains the crypto algorithms applied to the encoded header and payload. The jwtEncodedString is the result of those operations. 50 | 51 | Contains JSON objects representing the cryptographic operations applied to the JWT and optionally any additional properties of the JWT. 52 | Contains JSON objects representing the claims contained in the JWT. Each claim is a JSON object of the form { Name, Value }. 53 | 'header' is null. 54 | 'payload' is null. 55 | 56 | 57 | 58 | Gets the 'value' of the 'actor' claim { actort, 'value' }. 59 | 60 | If the 'actor' claim is not found, an empty string is returned. 61 | 62 | 63 | 64 | Gets the 'value' of the 'alg' claim { alg, 'value' }. 65 | 66 | If the 'alg' claim is not found, an empty string is returned. 67 | 68 | 69 | 70 | Gets the list of 'audience' claim { aud, 'value' }. 71 | 72 | If the 'audience' claim is not found, enumeration will be empty. 73 | 74 | 75 | 76 | Gets a for each JSON { name, value }. 77 | 78 | 79 | 80 | 81 | Gets the 'value' of the 'cty' claim { cty, 'value' }. 82 | 83 | If the 'cty' claim is not found, an empty string is returned. 84 | 85 | 86 | 87 | Represents the cryptographic operations applied to the JWT and optionally any additional properties of the JWT. 88 | 89 | 90 | 91 | 92 | Gets the 'value' of the 'JWT ID' claim { jti, ''value' }. 93 | 94 | If the 'JWT ID' claim is not found, an empty string is returned. 95 | 96 | 97 | 98 | Gets the 'value' of the 'iat' claim { iat, 'value' } converted to a assuming 'value' is seconds since UnixEpoch (UTC 1970-01-01T0:0:0Z). 99 | 100 | If the 'exp' claim is not found, then is returned. 101 | 102 | 103 | 104 | Gets the 'value' of the 'issuer' claim { iss, 'value' }. 105 | 106 | If the 'issuer' claim is not found, an empty string is returned. 107 | 108 | 109 | 110 | Gets the 'value' of the 'kid' claim { kid, 'value' }. 111 | 112 | If the 'kid' claim is not found, an empty string is returned. 113 | 114 | 115 | 116 | Represents the JSON payload. 117 | 118 | 119 | 120 | 121 | Gets the original raw data of this instance when it was created. 122 | 123 | 124 | 125 | 126 | Not implemented. 127 | 128 | 129 | 130 | 131 | Not implemented. 132 | 133 | 134 | 135 | 136 | Gets the 'value' of the 'sub' claim { sub, 'value' }. 137 | 138 | If the 'sub' claim is not found, an empty string is returned. 139 | 140 | 141 | 142 | Gets the 'value' of the 'typ' claim { typ, 'value' }. 143 | 144 | If the 'typ' claim is not found, an empty string is returned. 145 | 146 | 147 | 148 | Gets the 'value' of the 'notbefore' claim { nbf, 'value' } converted to a assuming 'value' is seconds since UnixEpoch (UTC 1970-01-01T0:0:0Z). 149 | 150 | If the 'notbefore' claim is not found, then is returned. 151 | 152 | 153 | 154 | Gets the 'value' of the 'exp' claim { exp, 'value' } converted to a assuming 'value' is seconds since UnixEpoch (UTC 1970-01-01T0:0:0Z). 155 | 156 | If the 'exp' claim is not found, then is returned. 157 | 158 | 159 | 160 | Gets the 'value' of the 'x5t' claim { x5t, 'value' }. 161 | 162 | If the 'x5t' claim is not found, an empty string is returned. 163 | 164 | 165 | 166 | Decodes the string into the header, payload and signature. 167 | 168 | the tokenized string. 169 | the original token. 170 | 171 | 172 | 173 | Decodes the payload and signature from the JWS parts. 174 | 175 | Parts of the JWS including the header. 176 | Assumes Header has already been set. 177 | 178 | 179 | 180 | Gets the DateTime using the number of seconds from 1970-01-01T0:0:0Z (UTC) 181 | 182 | Claim in the payload that should map to an integer, float, or string. 183 | If the claim is not found, the function returns: DateTime.MinValue 184 | 185 | If the value of the claim cannot be parsed into a long. 186 | The DateTime representation of a claim. 187 | 188 | 189 | 190 | A designed for creating and validating Json Web Tokens. 191 | See: http://tools.ietf.org/html/rfc7519 and http://www.rfc-editor.org/info/rfc7515. 192 | Currently only includes support for tokens in JWS format. 193 | 194 | 195 | 196 | 197 | Gets and sets the maximum token size in bytes that will be processed. 198 | 199 | 'value' less than 1. 200 | 201 | 202 | 203 | Gets the type of the . 204 | 205 | The type of 206 | 207 | 208 | 209 | Determines if the string is a well formed Json Web Token (JWT). 210 | see: http://tools.ietf.org/html/rfc7519 211 | 212 | String that should represent a valid JWT. 213 | Uses matching: 214 | JWS: @"^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$" 215 | 216 | 217 | 'false' if the token is null or whitespace. 218 | 'false' if token.Length is greater than . 219 | 'true' if the token is in JSON compact serialization format. 220 | 221 | 222 | 223 | 224 | Returns a value that indicates if this handler can validate a . 225 | 226 | 'true', indicating this instance can validate a . 227 | 228 | 229 | 230 | Creates a JWS. 231 | 232 | A JObject that represents the JWT token payload. 233 | Defines the security key and algorithm that will be used to sign the JWS. 234 | A JWS in Compact Serialization Format. 235 | 236 | 237 | 238 | Creates a JsonWebToken (JWS or JWE). 239 | 240 | A JObject that represents the JWT token payload. 241 | Defines the security key and algorithm that will be used to sign the JWT. 242 | Defines the security key and algorithm that will be used to encrypt the JWT. 243 | A JWT in compact serialization format. 244 | 245 | 246 | 247 | Creates a JsonWebToken (JWE or JWS). Raw header value is passed in as one of the parameters for testing purposes. 248 | Will be removed when this is released. 249 | 250 | 251 | 252 | 253 | Returns a to use when validating the signature of a token. 254 | 255 | The that is being validated. 256 | A required for validation. 257 | Returns a to use for signature validation. 258 | If key fails to resolve, then null is returned 259 | 260 | 261 | 262 | Converts a string into an instance of . 263 | 264 | A 'JSON Web Token' (JWT) in JWS Compact Serialization Format. 265 | A 266 | 'token' is null or empty. 267 | 'token.Length' is greater than . 268 | 269 | 270 | 271 | Converts a string into an instance of . 272 | 273 | A 'JSON Web Token' (JWT) in JWS Compact Serialization Format. 274 | A 275 | 'token' is null or empty. 276 | 'token.Length' is greater than . 277 | 278 | 279 | 280 | Validates a JWS. 281 | 282 | A 'JSON Web Token' (JWT) in JWS Compact Serialization Format. 283 | A required for validation. 284 | A 285 | 286 | 287 | 288 | Validates the JWT signature. 289 | 290 | 291 | 292 | 293 | Obtains a and validates the signature. 294 | 295 | Bytes to validate. 296 | Signature to compare against. 297 | to use. 298 | Crypto algorithm to use. 299 | Priority will be given to over . 300 | 'true' if signature is valid. 301 | 302 | 303 | 304 | Constants for Json Web Tokens. 305 | 306 | 307 | 308 | 309 | Short header type. 310 | 311 | 312 | 313 | 314 | Long header type. 315 | 316 | 317 | 318 | 319 | Short token type. 320 | 321 | 322 | 323 | 324 | Long token type. 325 | 326 | 327 | 328 | 329 | JWS - Token format: 'header.payload.signature'. Signature is optional, but '.' is required. 330 | 331 | 332 | 333 | 334 | JWE - Token format: 'protectedheader.encryptedkey.iv.cyphertext.authenticationtag'. 335 | 336 | 337 | 338 | 339 | The number of parts in a JWE token. 340 | 341 | 342 | 343 | 344 | The number of parts in a JWS token. 345 | 346 | 347 | 348 | 349 | The maximum number of parts in a JWT. 350 | 351 | 352 | 353 | 354 | JWE header alg indicating a shared symmetric key is directly used as CEK. 355 | 356 | 357 | 358 | 359 | List of header parameter names see: http://tools.ietf.org/html/rfc7519#section-5. 360 | 361 | 362 | 363 | 364 | see:https://tools.ietf.org/html/rfc7515#section-4.1.1 365 | 366 | 367 | 368 | 369 | see:https://tools.ietf.org/html/rfc7515#section-4.1.10 370 | also:https://tools.ietf.org/html/rfc7519#section-5.2 371 | 372 | 373 | 374 | 375 | see:https://tools.ietf.org/html/rfc7516#section-4.1.2 376 | 377 | 378 | 379 | 380 | see:https://tools.ietf.org/html/rfc7518#section-4.7.1.1 381 | 382 | 383 | 384 | 385 | see:https://tools.ietf.org/html/rfc7515#section-4.1.2 386 | 387 | 388 | 389 | 390 | see:https://tools.ietf.org/html/rfc7515#section-4.1.3 391 | 392 | 393 | 394 | 395 | see:https://tools.ietf.org/html/rfc7515#section-4.1.4 396 | 397 | 398 | 399 | 400 | see:https://tools.ietf.org/html/rfc7515#section-4.1.9 401 | also:https://tools.ietf.org/html/rfc7519#section-5.1 402 | 403 | 404 | 405 | 406 | see:https://tools.ietf.org/html/rfc7515#section-4.1.6 407 | 408 | 409 | 410 | 411 | see:https://tools.ietf.org/html/rfc7515#page-12 412 | 413 | 414 | 415 | 416 | see:https://tools.ietf.org/html/rfc7515#section-4.1.5 417 | 418 | 419 | 420 | 421 | see:https://tools.ietf.org/html/rfc7516#section-4.1.3 422 | 423 | 424 | 425 | 426 | List of registered claims from different sources 427 | http://tools.ietf.org/html/rfc7519#section-4 428 | http://openid.net/specs/openid-connect-core-1_0.html#IDToken 429 | 430 | 431 | 432 | 433 | http://tools.ietf.org/html/rfc7519#section-4 434 | 435 | 436 | 437 | 438 | http://openid.net/specs/openid-connect-core-1_0.html#IDToken 439 | 440 | 441 | 442 | 443 | http://openid.net/specs/openid-connect-core-1_0.html#IDToken 444 | 445 | 446 | 447 | 448 | http://tools.ietf.org/html/rfc7519#section-4 449 | 450 | 451 | 452 | 453 | http://openid.net/specs/openid-connect-core-1_0.html#IDToken 454 | 455 | 456 | 457 | 458 | http://openid.net/specs/openid-connect-core-1_0.html#IDToken 459 | 460 | 461 | 462 | 463 | http://tools.ietf.org/html/rfc7519#section-4 464 | 465 | 466 | 467 | 468 | http://tools.ietf.org/html/rfc7519#section-4 469 | 470 | 471 | 472 | 473 | http://openid.net/specs/openid-connect-core-1_0.html#CodeIDToken 474 | 475 | 476 | 477 | 478 | http://tools.ietf.org/html/rfc7519#section-4 479 | 480 | 481 | 482 | 483 | http://tools.ietf.org/html/rfc7519#section-4 484 | 485 | 486 | 487 | 488 | http://tools.ietf.org/html/rfc7519#section-4 489 | 490 | 491 | 492 | 493 | http://tools.ietf.org/html/rfc7519#section-4 494 | 495 | 496 | 497 | 498 | http://tools.ietf.org/html/rfc7519#section-4 499 | 500 | 501 | 502 | 503 | http://tools.ietf.org/html/rfc7519#section-4 504 | 505 | 506 | 507 | 508 | http://tools.ietf.org/html/rfc7519#section-4 509 | 510 | 511 | 512 | 513 | http://tools.ietf.org/html/rfc7519#section-4 514 | 515 | 516 | 517 | 518 | http://tools.ietf.org/html/rfc7519#section-4 519 | 520 | 521 | 522 | 523 | http://tools.ietf.org/html/rfc7519#section-4 524 | 525 | 526 | 527 | 528 | http://tools.ietf.org/html/rfc7519#section-4 529 | 530 | 531 | 532 | 533 | http://tools.ietf.org/html/rfc7519#section-4 534 | 535 | 536 | 537 | 538 | http://openid.net/specs/openid-connect-frontchannel-1_0.html#OPLogout 539 | 540 | 541 | 542 | 543 | http://tools.ietf.org/html/rfc7519#section-4 544 | 545 | 546 | 547 | 548 | http://tools.ietf.org/html/rfc7519#section-4 549 | 550 | 551 | 552 | 553 | http://tools.ietf.org/html/rfc7519#section-4 554 | 555 | 556 | 557 | 558 | http://tools.ietf.org/html/rfc7519#section-4 559 | 560 | 561 | 562 | 563 | A class which contains useful methods for processing JWT tokens. 564 | 565 | 566 | 567 | 568 | Regex that is used to figure out if a token is in JWS format. 569 | 570 | 571 | 572 | 573 | Regex that is used to figure out if a token is in JWE format. 574 | 575 | 576 | 577 | 578 | Produces a signature over the 'input'. 579 | 580 | String to be signed 581 | The that contain crypto specs used to sign the token. 582 | The bse64urlendcoded signature over the bytes obtained from UTF8Encoding.GetBytes( 'input' ). 583 | 'input' or 'signingCredentials' is null. 584 | 585 | 586 | 587 | Generates key bytes. 588 | 589 | 590 | 591 | 592 | Log messages and codes 593 | 594 | 595 | 596 | 597 | A class which contains the result of a token validation operation. 598 | 599 | 600 | 601 | 602 | The validated security token. 603 | 604 | 605 | 606 | 607 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.Logging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.Logging.dll -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.Logging.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.Logging.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.Logging.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.IdentityModel.Logging 5 | 6 | 7 | 8 | 9 | Event source based logger to log different events. 10 | 11 | 12 | 13 | 14 | Static logger that is exposed externally. An external application or framework can hook up a listener to this event source to log data in a custom way. 15 | 16 | 17 | 18 | 19 | Flag which indicates whether or not PII is shown in logs. False by default. 20 | 21 | 22 | 23 | 24 | String that is used in place of any arguments to log messages if the 'ShowPII' flag is set to false. 25 | 26 | 27 | 28 | 29 | Indicates whether or the log message header (contains library version, date/time, and PII debugging information) has been written. 30 | 31 | 32 | 33 | 34 | The log message that indicates the current library version. 35 | 36 | 37 | 38 | 39 | The log message that indicates the date. 40 | 41 | 42 | 43 | 44 | The log message that is shown when PII is off. 45 | 46 | 47 | 48 | 49 | The log message that is shown when PII is off. 50 | 51 | 52 | 53 | 54 | Writes an event log by using the provided string argument and current UTC time. 55 | No level filtering is done on the event. 56 | 57 | The log message. 58 | No level filtering. 59 | 60 | 61 | 62 | Writes an event log by using the provided string argument, current UTC time and the provided arguments list. 63 | 64 | The log message. 65 | An object array that contains zero or more objects to format. 66 | 67 | 68 | 69 | Writes a verbose event log by using the provided string argument and current UTC time. 70 | 71 | The log message. 72 | 73 | 74 | 75 | Writes a verbose event log by using the provided string argument, current UTC time and the provided arguments list. 76 | 77 | The log message. 78 | An object array that contains zero or more objects to format. 79 | 80 | 81 | 82 | Writes an information event log by using the provided string argument and current UTC time. 83 | 84 | The log message. 85 | 86 | 87 | 88 | Writes an information event log by using the provided string argument, current UTC time and the provided arguments list. 89 | 90 | The log message. 91 | An object array that contains zero or more objects to format. 92 | 93 | 94 | 95 | Writes a warning event log by using the provided string argument and current UTC time. 96 | 97 | The log message. 98 | 99 | 100 | 101 | Writes a warning event log by using the provided string argument, current UTC time and the provided arguments list. 102 | 103 | The log message. 104 | An object array that contains zero or more objects to format. 105 | 106 | 107 | 108 | Writes an error event log by using the provided string argument and current UTC time. 109 | 110 | The log message. 111 | 112 | 113 | 114 | Writes an error event log by using the provided string argument, current UTC time and the provided arguments list. 115 | 116 | The log message. 117 | An object array that contains zero or more objects to format. 118 | 119 | 120 | 121 | Writes a critical event log by using the provided string argument and current UTC time. 122 | 123 | The log message. 124 | 125 | 126 | 127 | Writes a critical event log by using the provided string argument, current UTC time and the provided arguments list. 128 | 129 | The log message. 130 | An object array that contains zero or more objects to format. 131 | 132 | 133 | 134 | Writes an exception log by using the provided event identifer, exception argument, string argument and current UTC time. 135 | 136 | 137 | 138 | The log message. 139 | 140 | 141 | 142 | Writes an exception log by using the provided event identifer, exception argument, string argument, arguments list and current UTC time. 143 | 144 | 145 | 146 | The log message. 147 | An object array that contains zero or more objects to format. 148 | 149 | 150 | 151 | Minimum log level to log events. Default is Warning. 152 | 153 | 154 | 155 | 156 | Helper class for logging. 157 | 158 | 159 | 160 | 161 | Logs an exception using the event source logger and returns new exception. 162 | 163 | argument that is null or empty. 164 | EventLevel is set to Error. 165 | 166 | 167 | 168 | Logs an exception using the event source logger and returns new typed exception. 169 | 170 | message to log. 171 | EventLevel is set to Error. 172 | 173 | 174 | 175 | Logs an argument exception using the event source logger and returns new typed exception. 176 | 177 | Identifies the argument whose value generated the ArgumentException. 178 | message to log. 179 | EventLevel is set to Error. 180 | 181 | 182 | 183 | Logs an exception using the event source logger and returns new typed exception. 184 | 185 | Format string of the log message. 186 | An object array that contains zero or more objects to format. 187 | EventLevel is set to Error. 188 | 189 | 190 | 191 | Logs an argument exception using the event source logger and returns new typed exception. 192 | 193 | Identifies the argument whose value generated the ArgumentException. 194 | Format string of the log message. 195 | An object array that contains zero or more objects to format. 196 | EventLevel is set to Error. 197 | 198 | 199 | 200 | Logs an exception using the event source logger and returns new typed exception. 201 | 202 | the inner to be added to the outer exception. 203 | message to log. 204 | EventLevel is set to Error. 205 | 206 | 207 | 208 | Logs an argument exception using the event source logger and returns new typed exception. 209 | 210 | Identifies the argument whose value generated the ArgumentException. 211 | the inner to be added to the outer exception. 212 | message to log. 213 | EventLevel is set to Error. 214 | 215 | 216 | 217 | Logs an exception using the event source logger and returns new typed exception. 218 | 219 | the inner to be added to the outer exception. 220 | Format string of the log message. 221 | An object array that contains zero or more objects to format. 222 | EventLevel is set to Error. 223 | 224 | 225 | 226 | Logs an argument exception using the event source logger and returns new typed exception. 227 | 228 | Identifies the argument whose value generated the ArgumentException. 229 | the inner to be added to the outer exception. 230 | Format string of the log message. 231 | An object array that contains zero or more objects to format. 232 | EventLevel is set to Error. 233 | 234 | 235 | 236 | Logs an exception using the event source logger and returns new typed exception. 237 | 238 | Identifies the level of an event to be logged. 239 | message to log. 240 | 241 | 242 | 243 | Logs an argument exception using the event source logger and returns new typed exception. 244 | 245 | Identifies the level of an event to be logged. 246 | Identifies the argument whose value generated the ArgumentException. 247 | message to log. 248 | 249 | 250 | 251 | Logs an exception using the event source logger and returns new typed exception. 252 | 253 | Identifies the level of an event to be logged. 254 | Format string of the log message. 255 | An object array that contains zero or more objects to format. 256 | 257 | 258 | 259 | Logs an argument exception using the event source logger and returns new typed exception. 260 | 261 | Identifies the level of an event to be logged. 262 | Identifies the argument whose value generated the ArgumentException. 263 | Format string of the log message. 264 | An object array that contains zero or more objects to format. 265 | 266 | 267 | 268 | Logs an exception using the event source logger and returns new typed exception. 269 | 270 | Identifies the level of an event to be logged. 271 | the inner to be added to the outer exception. 272 | message to log. 273 | 274 | 275 | 276 | Logs an argument exception using the event source logger and returns new typed exception. 277 | 278 | Identifies the level of an event to be logged. 279 | Identifies the argument whose value generated the ArgumentException. 280 | the inner to be added to the outer exception. 281 | message to log. 282 | 283 | 284 | 285 | Logs an exception using the event source logger and returns new typed exception. 286 | 287 | Identifies the level of an event to be logged. 288 | the inner to be added to the outer exception. 289 | Format string of the log message. 290 | An object array that contains zero or more objects to format. 291 | 292 | 293 | 294 | Logs an argument exception using the event source logger and returns new typed exception. 295 | 296 | Identifies the level of an event to be logged. 297 | Identifies the argument whose value generated the ArgumentException. 298 | the inner to be added to the outer exception. 299 | Format string of the log message. 300 | An object array that contains zero or more objects to format. 301 | 302 | 303 | 304 | Logs an exception using the event source logger. 305 | 306 | The exception to log. 307 | 308 | 309 | 310 | Logs an exception using the event source logger. 311 | 312 | Identifies the level of an event to be logged. 313 | The exception to log. 314 | 315 | 316 | 317 | Logs an information event. 318 | 319 | The log message. 320 | An object array that contains zero or more objects to format. 321 | 322 | 323 | 324 | Logs a verbose event. 325 | 326 | The log message. 327 | An object array that contains zero or more objects to format. 328 | 329 | 330 | 331 | Logs a warning event. 332 | 333 | The log message. 334 | An object array that contains zero or more objects to format. 335 | 336 | 337 | 338 | Logs an exception using the event source logger and returns new typed exception. 339 | 340 | Identifies the level of an event to be logged. 341 | Identifies the argument whose value generated the ArgumentException. 342 | the inner to be added to the outer exception. 343 | Format string of the log message. 344 | An object array that contains zero or more objects to format. 345 | 346 | 347 | 348 | Formats the string using InvariantCulture 349 | 350 | Format string. 351 | Format arguments. 352 | Formatted string. 353 | 354 | 355 | 356 | Log messages and codes for Microsoft.IdentityModel.Logging 357 | 358 | 359 | 360 | 361 | Event listener that writes logs to a file or a fileStream provided by user. 362 | 363 | 364 | 365 | 366 | Name of the default log file, excluding its path. 367 | 368 | 369 | 370 | 371 | Initializes a new instance of that writes logs to text file. 372 | 373 | 374 | 375 | 376 | Initializes a new instance of that writes logs to text file. 377 | 378 | location of the file where log messages will be written. 379 | 380 | 381 | 382 | Initializes a new instance of that writes logs to text file. 383 | 384 | StreamWriter where logs will be written. 385 | 386 | 387 | 388 | Called whenever an event has been written by an event source for which the event listener has enabled events. 389 | 390 | 391 | 392 | 393 | 394 | Releases all resources used by the current instance of the class. 395 | 396 | 397 | 398 | 399 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.Tokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.Tokens.dll -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.Tokens.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/bin/Debug/Microsoft.IdentityModel.Tokens.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/bin/Debug/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/System.IdentityModel.Tokens.Jwt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/bin/Debug/System.IdentityModel.Tokens.Jwt.dll -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/bin/Debug/System.IdentityModel.Tokens.Jwt.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/bin/Debug/System.IdentityModel.Tokens.Jwt.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/obj/Debug/AuthenticationService.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/obj/Debug/AuthenticationService.csproj.CopyComplete -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/obj/Debug/AuthenticationService.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 6008119d368f680d7d6824eaedbb116c15388287 2 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/obj/Debug/AuthenticationService.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\AuthenticationService.exe.config 2 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\AuthenticationService.exe 3 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\AuthenticationService.pdb 4 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\Microsoft.IdentityModel.JsonWebTokens.dll 5 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\Microsoft.IdentityModel.Logging.dll 6 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\Microsoft.IdentityModel.Tokens.dll 7 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\Newtonsoft.Json.dll 8 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\System.IdentityModel.Tokens.Jwt.dll 9 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\Microsoft.IdentityModel.JsonWebTokens.pdb 10 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\Microsoft.IdentityModel.JsonWebTokens.xml 11 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\Microsoft.IdentityModel.Logging.pdb 12 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\Microsoft.IdentityModel.Logging.xml 13 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\Microsoft.IdentityModel.Tokens.pdb 14 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\Microsoft.IdentityModel.Tokens.xml 15 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\Newtonsoft.Json.xml 16 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\System.IdentityModel.Tokens.Jwt.pdb 17 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\bin\Debug\System.IdentityModel.Tokens.Jwt.xml 18 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\obj\Debug\AuthenticationService.csprojAssemblyReference.cache 19 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\obj\Debug\AuthenticationService.csproj.CoreCompileInputs.cache 20 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\obj\Debug\AuthenticationService.csproj.CopyComplete 21 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\obj\Debug\AuthenticationService.exe 22 | C:\Users\mmosh\source\repos\AuthenticationService\AuthenticationService\obj\Debug\AuthenticationService.pdb 23 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\AuthenticationService.exe.config 24 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\AuthenticationService.exe 25 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\AuthenticationService.pdb 26 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\Microsoft.IdentityModel.JsonWebTokens.dll 27 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\Microsoft.IdentityModel.Logging.dll 28 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\Microsoft.IdentityModel.Tokens.dll 29 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\Newtonsoft.Json.dll 30 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\System.IdentityModel.Tokens.Jwt.dll 31 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\Microsoft.IdentityModel.JsonWebTokens.pdb 32 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\Microsoft.IdentityModel.JsonWebTokens.xml 33 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\Microsoft.IdentityModel.Logging.pdb 34 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\Microsoft.IdentityModel.Logging.xml 35 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\Microsoft.IdentityModel.Tokens.pdb 36 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\Microsoft.IdentityModel.Tokens.xml 37 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\Newtonsoft.Json.xml 38 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\System.IdentityModel.Tokens.Jwt.pdb 39 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\bin\Debug\System.IdentityModel.Tokens.Jwt.xml 40 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\obj\Debug\AuthenticationService.csprojAssemblyReference.cache 41 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\obj\Debug\AuthenticationService.csproj.CoreCompileInputs.cache 42 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\obj\Debug\AuthenticationService.csproj.CopyComplete 43 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\obj\Debug\AuthenticationService.exe 44 | C:\Users\mmosh\Desktop\Moshe Files\JWTTuts\AuthenticationService C#\AuthenticationService\obj\Debug\AuthenticationService.pdb 45 | -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/obj/Debug/AuthenticationService.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/obj/Debug/AuthenticationService.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/obj/Debug/AuthenticationService.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/obj/Debug/AuthenticationService.exe -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/obj/Debug/AuthenticationService.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/obj/Debug/AuthenticationService.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/AuthenticationService/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /AuthenticationService C#/AuthenticationService/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/.signature.p7s -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/Microsoft.IdentityModel.JsonWebTokens.5.2.4.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/Microsoft.IdentityModel.JsonWebTokens.5.2.4.nupkg -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/lib/net45/Microsoft.IdentityModel.JsonWebTokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/lib/net45/Microsoft.IdentityModel.JsonWebTokens.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/lib/net45/Microsoft.IdentityModel.JsonWebTokens.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/lib/net45/Microsoft.IdentityModel.JsonWebTokens.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/lib/net451/Microsoft.IdentityModel.JsonWebTokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/lib/net451/Microsoft.IdentityModel.JsonWebTokens.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/lib/net451/Microsoft.IdentityModel.JsonWebTokens.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/lib/net451/Microsoft.IdentityModel.JsonWebTokens.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.JsonWebTokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.JsonWebTokens.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.JsonWebTokens.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.JsonWebTokens.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.JsonWebTokens.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/.signature.p7s -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/Microsoft.IdentityModel.Logging.5.2.4.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/Microsoft.IdentityModel.Logging.5.2.4.nupkg -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/net45/Microsoft.IdentityModel.Logging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/net45/Microsoft.IdentityModel.Logging.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/net45/Microsoft.IdentityModel.Logging.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/net45/Microsoft.IdentityModel.Logging.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/net45/Microsoft.IdentityModel.Logging.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.IdentityModel.Logging 5 | 6 | 7 | 8 | 9 | Event source based logger to log different events. 10 | 11 | 12 | 13 | 14 | Static logger that is exposed externally. An external application or framework can hook up a listener to this event source to log data in a custom way. 15 | 16 | 17 | 18 | 19 | Flag which indicates whether or not PII is shown in logs. False by default. 20 | 21 | 22 | 23 | 24 | String that is used in place of any arguments to log messages if the 'ShowPII' flag is set to false. 25 | 26 | 27 | 28 | 29 | Indicates whether or the log message header (contains library version, date/time, and PII debugging information) has been written. 30 | 31 | 32 | 33 | 34 | The log message that indicates the current library version. 35 | 36 | 37 | 38 | 39 | The log message that indicates the date. 40 | 41 | 42 | 43 | 44 | The log message that is shown when PII is off. 45 | 46 | 47 | 48 | 49 | The log message that is shown when PII is off. 50 | 51 | 52 | 53 | 54 | Writes an event log by using the provided string argument and current UTC time. 55 | No level filtering is done on the event. 56 | 57 | The log message. 58 | No level filtering. 59 | 60 | 61 | 62 | Writes an event log by using the provided string argument, current UTC time and the provided arguments list. 63 | 64 | The log message. 65 | An object array that contains zero or more objects to format. 66 | 67 | 68 | 69 | Writes a verbose event log by using the provided string argument and current UTC time. 70 | 71 | The log message. 72 | 73 | 74 | 75 | Writes a verbose event log by using the provided string argument, current UTC time and the provided arguments list. 76 | 77 | The log message. 78 | An object array that contains zero or more objects to format. 79 | 80 | 81 | 82 | Writes an information event log by using the provided string argument and current UTC time. 83 | 84 | The log message. 85 | 86 | 87 | 88 | Writes an information event log by using the provided string argument, current UTC time and the provided arguments list. 89 | 90 | The log message. 91 | An object array that contains zero or more objects to format. 92 | 93 | 94 | 95 | Writes a warning event log by using the provided string argument and current UTC time. 96 | 97 | The log message. 98 | 99 | 100 | 101 | Writes a warning event log by using the provided string argument, current UTC time and the provided arguments list. 102 | 103 | The log message. 104 | An object array that contains zero or more objects to format. 105 | 106 | 107 | 108 | Writes an error event log by using the provided string argument and current UTC time. 109 | 110 | The log message. 111 | 112 | 113 | 114 | Writes an error event log by using the provided string argument, current UTC time and the provided arguments list. 115 | 116 | The log message. 117 | An object array that contains zero or more objects to format. 118 | 119 | 120 | 121 | Writes a critical event log by using the provided string argument and current UTC time. 122 | 123 | The log message. 124 | 125 | 126 | 127 | Writes a critical event log by using the provided string argument, current UTC time and the provided arguments list. 128 | 129 | The log message. 130 | An object array that contains zero or more objects to format. 131 | 132 | 133 | 134 | Writes an exception log by using the provided event identifer, exception argument, string argument and current UTC time. 135 | 136 | 137 | 138 | The log message. 139 | 140 | 141 | 142 | Writes an exception log by using the provided event identifer, exception argument, string argument, arguments list and current UTC time. 143 | 144 | 145 | 146 | The log message. 147 | An object array that contains zero or more objects to format. 148 | 149 | 150 | 151 | Minimum log level to log events. Default is Warning. 152 | 153 | 154 | 155 | 156 | Helper class for logging. 157 | 158 | 159 | 160 | 161 | Logs an exception using the event source logger and returns new exception. 162 | 163 | argument that is null or empty. 164 | EventLevel is set to Error. 165 | 166 | 167 | 168 | Logs an exception using the event source logger and returns new typed exception. 169 | 170 | message to log. 171 | EventLevel is set to Error. 172 | 173 | 174 | 175 | Logs an argument exception using the event source logger and returns new typed exception. 176 | 177 | Identifies the argument whose value generated the ArgumentException. 178 | message to log. 179 | EventLevel is set to Error. 180 | 181 | 182 | 183 | Logs an exception using the event source logger and returns new typed exception. 184 | 185 | Format string of the log message. 186 | An object array that contains zero or more objects to format. 187 | EventLevel is set to Error. 188 | 189 | 190 | 191 | Logs an argument exception using the event source logger and returns new typed exception. 192 | 193 | Identifies the argument whose value generated the ArgumentException. 194 | Format string of the log message. 195 | An object array that contains zero or more objects to format. 196 | EventLevel is set to Error. 197 | 198 | 199 | 200 | Logs an exception using the event source logger and returns new typed exception. 201 | 202 | the inner to be added to the outer exception. 203 | message to log. 204 | EventLevel is set to Error. 205 | 206 | 207 | 208 | Logs an argument exception using the event source logger and returns new typed exception. 209 | 210 | Identifies the argument whose value generated the ArgumentException. 211 | the inner to be added to the outer exception. 212 | message to log. 213 | EventLevel is set to Error. 214 | 215 | 216 | 217 | Logs an exception using the event source logger and returns new typed exception. 218 | 219 | the inner to be added to the outer exception. 220 | Format string of the log message. 221 | An object array that contains zero or more objects to format. 222 | EventLevel is set to Error. 223 | 224 | 225 | 226 | Logs an argument exception using the event source logger and returns new typed exception. 227 | 228 | Identifies the argument whose value generated the ArgumentException. 229 | the inner to be added to the outer exception. 230 | Format string of the log message. 231 | An object array that contains zero or more objects to format. 232 | EventLevel is set to Error. 233 | 234 | 235 | 236 | Logs an exception using the event source logger and returns new typed exception. 237 | 238 | Identifies the level of an event to be logged. 239 | message to log. 240 | 241 | 242 | 243 | Logs an argument exception using the event source logger and returns new typed exception. 244 | 245 | Identifies the level of an event to be logged. 246 | Identifies the argument whose value generated the ArgumentException. 247 | message to log. 248 | 249 | 250 | 251 | Logs an exception using the event source logger and returns new typed exception. 252 | 253 | Identifies the level of an event to be logged. 254 | Format string of the log message. 255 | An object array that contains zero or more objects to format. 256 | 257 | 258 | 259 | Logs an argument exception using the event source logger and returns new typed exception. 260 | 261 | Identifies the level of an event to be logged. 262 | Identifies the argument whose value generated the ArgumentException. 263 | Format string of the log message. 264 | An object array that contains zero or more objects to format. 265 | 266 | 267 | 268 | Logs an exception using the event source logger and returns new typed exception. 269 | 270 | Identifies the level of an event to be logged. 271 | the inner to be added to the outer exception. 272 | message to log. 273 | 274 | 275 | 276 | Logs an argument exception using the event source logger and returns new typed exception. 277 | 278 | Identifies the level of an event to be logged. 279 | Identifies the argument whose value generated the ArgumentException. 280 | the inner to be added to the outer exception. 281 | message to log. 282 | 283 | 284 | 285 | Logs an exception using the event source logger and returns new typed exception. 286 | 287 | Identifies the level of an event to be logged. 288 | the inner to be added to the outer exception. 289 | Format string of the log message. 290 | An object array that contains zero or more objects to format. 291 | 292 | 293 | 294 | Logs an argument exception using the event source logger and returns new typed exception. 295 | 296 | Identifies the level of an event to be logged. 297 | Identifies the argument whose value generated the ArgumentException. 298 | the inner to be added to the outer exception. 299 | Format string of the log message. 300 | An object array that contains zero or more objects to format. 301 | 302 | 303 | 304 | Logs an exception using the event source logger. 305 | 306 | The exception to log. 307 | 308 | 309 | 310 | Logs an exception using the event source logger. 311 | 312 | Identifies the level of an event to be logged. 313 | The exception to log. 314 | 315 | 316 | 317 | Logs an information event. 318 | 319 | The log message. 320 | An object array that contains zero or more objects to format. 321 | 322 | 323 | 324 | Logs a verbose event. 325 | 326 | The log message. 327 | An object array that contains zero or more objects to format. 328 | 329 | 330 | 331 | Logs a warning event. 332 | 333 | The log message. 334 | An object array that contains zero or more objects to format. 335 | 336 | 337 | 338 | Logs an exception using the event source logger and returns new typed exception. 339 | 340 | Identifies the level of an event to be logged. 341 | Identifies the argument whose value generated the ArgumentException. 342 | the inner to be added to the outer exception. 343 | Format string of the log message. 344 | An object array that contains zero or more objects to format. 345 | 346 | 347 | 348 | Formats the string using InvariantCulture 349 | 350 | Format string. 351 | Format arguments. 352 | Formatted string. 353 | 354 | 355 | 356 | Log messages and codes for Microsoft.IdentityModel.Logging 357 | 358 | 359 | 360 | 361 | Event listener that writes logs to a file or a fileStream provided by user. 362 | 363 | 364 | 365 | 366 | Name of the default log file, excluding its path. 367 | 368 | 369 | 370 | 371 | Initializes a new instance of that writes logs to text file. 372 | 373 | 374 | 375 | 376 | Initializes a new instance of that writes logs to text file. 377 | 378 | location of the file where log messages will be written. 379 | 380 | 381 | 382 | Initializes a new instance of that writes logs to text file. 383 | 384 | StreamWriter where logs will be written. 385 | 386 | 387 | 388 | Called whenever an event has been written by an event source for which the event listener has enabled events. 389 | 390 | 391 | 392 | 393 | 394 | Releases all resources used by the current instance of the class. 395 | 396 | 397 | 398 | 399 | -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/net451/Microsoft.IdentityModel.Logging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/net451/Microsoft.IdentityModel.Logging.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/net451/Microsoft.IdentityModel.Logging.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/net451/Microsoft.IdentityModel.Logging.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/net451/Microsoft.IdentityModel.Logging.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.IdentityModel.Logging 5 | 6 | 7 | 8 | 9 | Event source based logger to log different events. 10 | 11 | 12 | 13 | 14 | Static logger that is exposed externally. An external application or framework can hook up a listener to this event source to log data in a custom way. 15 | 16 | 17 | 18 | 19 | Flag which indicates whether or not PII is shown in logs. False by default. 20 | 21 | 22 | 23 | 24 | String that is used in place of any arguments to log messages if the 'ShowPII' flag is set to false. 25 | 26 | 27 | 28 | 29 | Indicates whether or the log message header (contains library version, date/time, and PII debugging information) has been written. 30 | 31 | 32 | 33 | 34 | The log message that indicates the current library version. 35 | 36 | 37 | 38 | 39 | The log message that indicates the date. 40 | 41 | 42 | 43 | 44 | The log message that is shown when PII is off. 45 | 46 | 47 | 48 | 49 | The log message that is shown when PII is off. 50 | 51 | 52 | 53 | 54 | Writes an event log by using the provided string argument and current UTC time. 55 | No level filtering is done on the event. 56 | 57 | The log message. 58 | No level filtering. 59 | 60 | 61 | 62 | Writes an event log by using the provided string argument, current UTC time and the provided arguments list. 63 | 64 | The log message. 65 | An object array that contains zero or more objects to format. 66 | 67 | 68 | 69 | Writes a verbose event log by using the provided string argument and current UTC time. 70 | 71 | The log message. 72 | 73 | 74 | 75 | Writes a verbose event log by using the provided string argument, current UTC time and the provided arguments list. 76 | 77 | The log message. 78 | An object array that contains zero or more objects to format. 79 | 80 | 81 | 82 | Writes an information event log by using the provided string argument and current UTC time. 83 | 84 | The log message. 85 | 86 | 87 | 88 | Writes an information event log by using the provided string argument, current UTC time and the provided arguments list. 89 | 90 | The log message. 91 | An object array that contains zero or more objects to format. 92 | 93 | 94 | 95 | Writes a warning event log by using the provided string argument and current UTC time. 96 | 97 | The log message. 98 | 99 | 100 | 101 | Writes a warning event log by using the provided string argument, current UTC time and the provided arguments list. 102 | 103 | The log message. 104 | An object array that contains zero or more objects to format. 105 | 106 | 107 | 108 | Writes an error event log by using the provided string argument and current UTC time. 109 | 110 | The log message. 111 | 112 | 113 | 114 | Writes an error event log by using the provided string argument, current UTC time and the provided arguments list. 115 | 116 | The log message. 117 | An object array that contains zero or more objects to format. 118 | 119 | 120 | 121 | Writes a critical event log by using the provided string argument and current UTC time. 122 | 123 | The log message. 124 | 125 | 126 | 127 | Writes a critical event log by using the provided string argument, current UTC time and the provided arguments list. 128 | 129 | The log message. 130 | An object array that contains zero or more objects to format. 131 | 132 | 133 | 134 | Writes an exception log by using the provided event identifer, exception argument, string argument and current UTC time. 135 | 136 | 137 | 138 | The log message. 139 | 140 | 141 | 142 | Writes an exception log by using the provided event identifer, exception argument, string argument, arguments list and current UTC time. 143 | 144 | 145 | 146 | The log message. 147 | An object array that contains zero or more objects to format. 148 | 149 | 150 | 151 | Minimum log level to log events. Default is Warning. 152 | 153 | 154 | 155 | 156 | Helper class for logging. 157 | 158 | 159 | 160 | 161 | Logs an exception using the event source logger and returns new exception. 162 | 163 | argument that is null or empty. 164 | EventLevel is set to Error. 165 | 166 | 167 | 168 | Logs an exception using the event source logger and returns new typed exception. 169 | 170 | message to log. 171 | EventLevel is set to Error. 172 | 173 | 174 | 175 | Logs an argument exception using the event source logger and returns new typed exception. 176 | 177 | Identifies the argument whose value generated the ArgumentException. 178 | message to log. 179 | EventLevel is set to Error. 180 | 181 | 182 | 183 | Logs an exception using the event source logger and returns new typed exception. 184 | 185 | Format string of the log message. 186 | An object array that contains zero or more objects to format. 187 | EventLevel is set to Error. 188 | 189 | 190 | 191 | Logs an argument exception using the event source logger and returns new typed exception. 192 | 193 | Identifies the argument whose value generated the ArgumentException. 194 | Format string of the log message. 195 | An object array that contains zero or more objects to format. 196 | EventLevel is set to Error. 197 | 198 | 199 | 200 | Logs an exception using the event source logger and returns new typed exception. 201 | 202 | the inner to be added to the outer exception. 203 | message to log. 204 | EventLevel is set to Error. 205 | 206 | 207 | 208 | Logs an argument exception using the event source logger and returns new typed exception. 209 | 210 | Identifies the argument whose value generated the ArgumentException. 211 | the inner to be added to the outer exception. 212 | message to log. 213 | EventLevel is set to Error. 214 | 215 | 216 | 217 | Logs an exception using the event source logger and returns new typed exception. 218 | 219 | the inner to be added to the outer exception. 220 | Format string of the log message. 221 | An object array that contains zero or more objects to format. 222 | EventLevel is set to Error. 223 | 224 | 225 | 226 | Logs an argument exception using the event source logger and returns new typed exception. 227 | 228 | Identifies the argument whose value generated the ArgumentException. 229 | the inner to be added to the outer exception. 230 | Format string of the log message. 231 | An object array that contains zero or more objects to format. 232 | EventLevel is set to Error. 233 | 234 | 235 | 236 | Logs an exception using the event source logger and returns new typed exception. 237 | 238 | Identifies the level of an event to be logged. 239 | message to log. 240 | 241 | 242 | 243 | Logs an argument exception using the event source logger and returns new typed exception. 244 | 245 | Identifies the level of an event to be logged. 246 | Identifies the argument whose value generated the ArgumentException. 247 | message to log. 248 | 249 | 250 | 251 | Logs an exception using the event source logger and returns new typed exception. 252 | 253 | Identifies the level of an event to be logged. 254 | Format string of the log message. 255 | An object array that contains zero or more objects to format. 256 | 257 | 258 | 259 | Logs an argument exception using the event source logger and returns new typed exception. 260 | 261 | Identifies the level of an event to be logged. 262 | Identifies the argument whose value generated the ArgumentException. 263 | Format string of the log message. 264 | An object array that contains zero or more objects to format. 265 | 266 | 267 | 268 | Logs an exception using the event source logger and returns new typed exception. 269 | 270 | Identifies the level of an event to be logged. 271 | the inner to be added to the outer exception. 272 | message to log. 273 | 274 | 275 | 276 | Logs an argument exception using the event source logger and returns new typed exception. 277 | 278 | Identifies the level of an event to be logged. 279 | Identifies the argument whose value generated the ArgumentException. 280 | the inner to be added to the outer exception. 281 | message to log. 282 | 283 | 284 | 285 | Logs an exception using the event source logger and returns new typed exception. 286 | 287 | Identifies the level of an event to be logged. 288 | the inner to be added to the outer exception. 289 | Format string of the log message. 290 | An object array that contains zero or more objects to format. 291 | 292 | 293 | 294 | Logs an argument exception using the event source logger and returns new typed exception. 295 | 296 | Identifies the level of an event to be logged. 297 | Identifies the argument whose value generated the ArgumentException. 298 | the inner to be added to the outer exception. 299 | Format string of the log message. 300 | An object array that contains zero or more objects to format. 301 | 302 | 303 | 304 | Logs an exception using the event source logger. 305 | 306 | The exception to log. 307 | 308 | 309 | 310 | Logs an exception using the event source logger. 311 | 312 | Identifies the level of an event to be logged. 313 | The exception to log. 314 | 315 | 316 | 317 | Logs an information event. 318 | 319 | The log message. 320 | An object array that contains zero or more objects to format. 321 | 322 | 323 | 324 | Logs a verbose event. 325 | 326 | The log message. 327 | An object array that contains zero or more objects to format. 328 | 329 | 330 | 331 | Logs a warning event. 332 | 333 | The log message. 334 | An object array that contains zero or more objects to format. 335 | 336 | 337 | 338 | Logs an exception using the event source logger and returns new typed exception. 339 | 340 | Identifies the level of an event to be logged. 341 | Identifies the argument whose value generated the ArgumentException. 342 | the inner to be added to the outer exception. 343 | Format string of the log message. 344 | An object array that contains zero or more objects to format. 345 | 346 | 347 | 348 | Formats the string using InvariantCulture 349 | 350 | Format string. 351 | Format arguments. 352 | Formatted string. 353 | 354 | 355 | 356 | Log messages and codes for Microsoft.IdentityModel.Logging 357 | 358 | 359 | 360 | 361 | Event listener that writes logs to a file or a fileStream provided by user. 362 | 363 | 364 | 365 | 366 | Name of the default log file, excluding its path. 367 | 368 | 369 | 370 | 371 | Initializes a new instance of that writes logs to text file. 372 | 373 | 374 | 375 | 376 | Initializes a new instance of that writes logs to text file. 377 | 378 | location of the file where log messages will be written. 379 | 380 | 381 | 382 | Initializes a new instance of that writes logs to text file. 383 | 384 | StreamWriter where logs will be written. 385 | 386 | 387 | 388 | Called whenever an event has been written by an event source for which the event listener has enabled events. 389 | 390 | 391 | 392 | 393 | 394 | Releases all resources used by the current instance of the class. 395 | 396 | 397 | 398 | 399 | -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.Logging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.Logging.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.Logging.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.Logging.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Logging.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.Logging.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.IdentityModel.Logging 5 | 6 | 7 | 8 | 9 | Event source based logger to log different events. 10 | 11 | 12 | 13 | 14 | Static logger that is exposed externally. An external application or framework can hook up a listener to this event source to log data in a custom way. 15 | 16 | 17 | 18 | 19 | Flag which indicates whether or not PII is shown in logs. False by default. 20 | 21 | 22 | 23 | 24 | String that is used in place of any arguments to log messages if the 'ShowPII' flag is set to false. 25 | 26 | 27 | 28 | 29 | Indicates whether or the log message header (contains library version, date/time, and PII debugging information) has been written. 30 | 31 | 32 | 33 | 34 | The log message that indicates the current library version. 35 | 36 | 37 | 38 | 39 | The log message that indicates the date. 40 | 41 | 42 | 43 | 44 | The log message that is shown when PII is off. 45 | 46 | 47 | 48 | 49 | The log message that is shown when PII is off. 50 | 51 | 52 | 53 | 54 | Writes an event log by using the provided string argument and current UTC time. 55 | No level filtering is done on the event. 56 | 57 | The log message. 58 | No level filtering. 59 | 60 | 61 | 62 | Writes an event log by using the provided string argument, current UTC time and the provided arguments list. 63 | 64 | The log message. 65 | An object array that contains zero or more objects to format. 66 | 67 | 68 | 69 | Writes a verbose event log by using the provided string argument and current UTC time. 70 | 71 | The log message. 72 | 73 | 74 | 75 | Writes a verbose event log by using the provided string argument, current UTC time and the provided arguments list. 76 | 77 | The log message. 78 | An object array that contains zero or more objects to format. 79 | 80 | 81 | 82 | Writes an information event log by using the provided string argument and current UTC time. 83 | 84 | The log message. 85 | 86 | 87 | 88 | Writes an information event log by using the provided string argument, current UTC time and the provided arguments list. 89 | 90 | The log message. 91 | An object array that contains zero or more objects to format. 92 | 93 | 94 | 95 | Writes a warning event log by using the provided string argument and current UTC time. 96 | 97 | The log message. 98 | 99 | 100 | 101 | Writes a warning event log by using the provided string argument, current UTC time and the provided arguments list. 102 | 103 | The log message. 104 | An object array that contains zero or more objects to format. 105 | 106 | 107 | 108 | Writes an error event log by using the provided string argument and current UTC time. 109 | 110 | The log message. 111 | 112 | 113 | 114 | Writes an error event log by using the provided string argument, current UTC time and the provided arguments list. 115 | 116 | The log message. 117 | An object array that contains zero or more objects to format. 118 | 119 | 120 | 121 | Writes a critical event log by using the provided string argument and current UTC time. 122 | 123 | The log message. 124 | 125 | 126 | 127 | Writes a critical event log by using the provided string argument, current UTC time and the provided arguments list. 128 | 129 | The log message. 130 | An object array that contains zero or more objects to format. 131 | 132 | 133 | 134 | Writes an exception log by using the provided event identifer, exception argument, string argument and current UTC time. 135 | 136 | 137 | 138 | The log message. 139 | 140 | 141 | 142 | Writes an exception log by using the provided event identifer, exception argument, string argument, arguments list and current UTC time. 143 | 144 | 145 | 146 | The log message. 147 | An object array that contains zero or more objects to format. 148 | 149 | 150 | 151 | Minimum log level to log events. Default is Warning. 152 | 153 | 154 | 155 | 156 | Helper class for logging. 157 | 158 | 159 | 160 | 161 | Logs an exception using the event source logger and returns new exception. 162 | 163 | argument that is null or empty. 164 | EventLevel is set to Error. 165 | 166 | 167 | 168 | Logs an exception using the event source logger and returns new typed exception. 169 | 170 | message to log. 171 | EventLevel is set to Error. 172 | 173 | 174 | 175 | Logs an argument exception using the event source logger and returns new typed exception. 176 | 177 | Identifies the argument whose value generated the ArgumentException. 178 | message to log. 179 | EventLevel is set to Error. 180 | 181 | 182 | 183 | Logs an exception using the event source logger and returns new typed exception. 184 | 185 | Format string of the log message. 186 | An object array that contains zero or more objects to format. 187 | EventLevel is set to Error. 188 | 189 | 190 | 191 | Logs an argument exception using the event source logger and returns new typed exception. 192 | 193 | Identifies the argument whose value generated the ArgumentException. 194 | Format string of the log message. 195 | An object array that contains zero or more objects to format. 196 | EventLevel is set to Error. 197 | 198 | 199 | 200 | Logs an exception using the event source logger and returns new typed exception. 201 | 202 | the inner to be added to the outer exception. 203 | message to log. 204 | EventLevel is set to Error. 205 | 206 | 207 | 208 | Logs an argument exception using the event source logger and returns new typed exception. 209 | 210 | Identifies the argument whose value generated the ArgumentException. 211 | the inner to be added to the outer exception. 212 | message to log. 213 | EventLevel is set to Error. 214 | 215 | 216 | 217 | Logs an exception using the event source logger and returns new typed exception. 218 | 219 | the inner to be added to the outer exception. 220 | Format string of the log message. 221 | An object array that contains zero or more objects to format. 222 | EventLevel is set to Error. 223 | 224 | 225 | 226 | Logs an argument exception using the event source logger and returns new typed exception. 227 | 228 | Identifies the argument whose value generated the ArgumentException. 229 | the inner to be added to the outer exception. 230 | Format string of the log message. 231 | An object array that contains zero or more objects to format. 232 | EventLevel is set to Error. 233 | 234 | 235 | 236 | Logs an exception using the event source logger and returns new typed exception. 237 | 238 | Identifies the level of an event to be logged. 239 | message to log. 240 | 241 | 242 | 243 | Logs an argument exception using the event source logger and returns new typed exception. 244 | 245 | Identifies the level of an event to be logged. 246 | Identifies the argument whose value generated the ArgumentException. 247 | message to log. 248 | 249 | 250 | 251 | Logs an exception using the event source logger and returns new typed exception. 252 | 253 | Identifies the level of an event to be logged. 254 | Format string of the log message. 255 | An object array that contains zero or more objects to format. 256 | 257 | 258 | 259 | Logs an argument exception using the event source logger and returns new typed exception. 260 | 261 | Identifies the level of an event to be logged. 262 | Identifies the argument whose value generated the ArgumentException. 263 | Format string of the log message. 264 | An object array that contains zero or more objects to format. 265 | 266 | 267 | 268 | Logs an exception using the event source logger and returns new typed exception. 269 | 270 | Identifies the level of an event to be logged. 271 | the inner to be added to the outer exception. 272 | message to log. 273 | 274 | 275 | 276 | Logs an argument exception using the event source logger and returns new typed exception. 277 | 278 | Identifies the level of an event to be logged. 279 | Identifies the argument whose value generated the ArgumentException. 280 | the inner to be added to the outer exception. 281 | message to log. 282 | 283 | 284 | 285 | Logs an exception using the event source logger and returns new typed exception. 286 | 287 | Identifies the level of an event to be logged. 288 | the inner to be added to the outer exception. 289 | Format string of the log message. 290 | An object array that contains zero or more objects to format. 291 | 292 | 293 | 294 | Logs an argument exception using the event source logger and returns new typed exception. 295 | 296 | Identifies the level of an event to be logged. 297 | Identifies the argument whose value generated the ArgumentException. 298 | the inner to be added to the outer exception. 299 | Format string of the log message. 300 | An object array that contains zero or more objects to format. 301 | 302 | 303 | 304 | Logs an exception using the event source logger. 305 | 306 | The exception to log. 307 | 308 | 309 | 310 | Logs an exception using the event source logger. 311 | 312 | Identifies the level of an event to be logged. 313 | The exception to log. 314 | 315 | 316 | 317 | Logs an information event. 318 | 319 | The log message. 320 | An object array that contains zero or more objects to format. 321 | 322 | 323 | 324 | Logs a verbose event. 325 | 326 | The log message. 327 | An object array that contains zero or more objects to format. 328 | 329 | 330 | 331 | Logs a warning event. 332 | 333 | The log message. 334 | An object array that contains zero or more objects to format. 335 | 336 | 337 | 338 | Logs an exception using the event source logger and returns new typed exception. 339 | 340 | Identifies the level of an event to be logged. 341 | Identifies the argument whose value generated the ArgumentException. 342 | the inner to be added to the outer exception. 343 | Format string of the log message. 344 | An object array that contains zero or more objects to format. 345 | 346 | 347 | 348 | Formats the string using InvariantCulture 349 | 350 | Format string. 351 | Format arguments. 352 | Formatted string. 353 | 354 | 355 | 356 | Log messages and codes for Microsoft.IdentityModel.Logging 357 | 358 | 359 | 360 | 361 | Event listener that writes logs to a file or a fileStream provided by user. 362 | 363 | 364 | 365 | 366 | Name of the default log file, excluding its path. 367 | 368 | 369 | 370 | 371 | Initializes a new instance of that writes logs to text file. 372 | 373 | 374 | 375 | 376 | Initializes a new instance of that writes logs to text file. 377 | 378 | location of the file where log messages will be written. 379 | 380 | 381 | 382 | Initializes a new instance of that writes logs to text file. 383 | 384 | StreamWriter where logs will be written. 385 | 386 | 387 | 388 | Called whenever an event has been written by an event source for which the event listener has enabled events. 389 | 390 | 391 | 392 | 393 | 394 | Releases all resources used by the current instance of the class. 395 | 396 | 397 | 398 | 399 | -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/.signature.p7s -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/Microsoft.IdentityModel.Tokens.5.2.4.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/Microsoft.IdentityModel.Tokens.5.2.4.nupkg -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/lib/net45/Microsoft.IdentityModel.Tokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/lib/net45/Microsoft.IdentityModel.Tokens.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/lib/net45/Microsoft.IdentityModel.Tokens.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/lib/net45/Microsoft.IdentityModel.Tokens.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/lib/net451/Microsoft.IdentityModel.Tokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/lib/net451/Microsoft.IdentityModel.Tokens.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/lib/net451/Microsoft.IdentityModel.Tokens.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/lib/net451/Microsoft.IdentityModel.Tokens.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.Tokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.Tokens.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.Tokens.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Microsoft.IdentityModel.Tokens.5.2.4/lib/netstandard1.4/Microsoft.IdentityModel.Tokens.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/Newtonsoft.Json.10.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/Newtonsoft.Json.10.0.1.nupkg -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/net20/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/net35/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/net35/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/net40/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/net40/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/net45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/netstandard1.0/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/netstandard1.0/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/netstandard1.3/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/netstandard1.3/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/portable-net45+win8+wpa81+wp8/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/lib/portable-net45+win8+wpa81+wp8/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/Newtonsoft.Json.10.0.1/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | # open json.net splash page on package install 4 | # don't open if json.net is installed as a dependency 5 | 6 | try 7 | { 8 | $url = "http://www.newtonsoft.com/json/install?version=" + $package.Version 9 | $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) 10 | 11 | if ($dte2.ActiveWindow.Caption -eq "Package Manager Console") 12 | { 13 | # user is installing from VS NuGet console 14 | # get reference to the window, the console host and the input history 15 | # show webpage if "install-package newtonsoft.json" was last input 16 | 17 | $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]) 18 | 19 | $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor ` 20 | [System.Reflection.BindingFlags]::NonPublic) 21 | 22 | $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1 23 | if ($prop -eq $null) { return } 24 | 25 | $hostInfo = $prop.GetValue($consoleWindow) 26 | if ($hostInfo -eq $null) { return } 27 | 28 | $history = $hostInfo.WpfConsole.InputHistory.History 29 | 30 | $lastCommand = $history | select -last 1 31 | 32 | if ($lastCommand) 33 | { 34 | $lastCommand = $lastCommand.Trim().ToLower() 35 | if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json")) 36 | { 37 | $dte2.ItemOperations.Navigate($url) | Out-Null 38 | } 39 | } 40 | } 41 | else 42 | { 43 | # user is installing from VS NuGet dialog 44 | # get reference to the window, then smart output console provider 45 | # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation 46 | 47 | $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor ` 48 | [System.Reflection.BindingFlags]::NonPublic) 49 | 50 | $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor ` 51 | [System.Reflection.BindingFlags]::NonPublic) 52 | 53 | if ($instanceField -eq $null -or $consoleField -eq $null) { return } 54 | 55 | $instance = $instanceField.GetValue($null) 56 | 57 | if ($instance -eq $null) { return } 58 | 59 | $consoleProvider = $consoleField.GetValue($instance) 60 | if ($consoleProvider -eq $null) { return } 61 | 62 | $console = $consoleProvider.CreateOutputConsole($false) 63 | 64 | $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor ` 65 | [System.Reflection.BindingFlags]::NonPublic) 66 | if ($messagesField -eq $null) { return } 67 | 68 | $messages = $messagesField.GetValue($console) 69 | if ($messages -eq $null) { return } 70 | 71 | $operations = $messages -split "==============================" 72 | 73 | $lastOperation = $operations | select -last 1 74 | 75 | if ($lastOperation) 76 | { 77 | $lastOperation = $lastOperation.ToLower() 78 | 79 | $lines = $lastOperation -split "`r`n" 80 | 81 | $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1 82 | 83 | if ($installMatch) 84 | { 85 | $dte2.ItemOperations.Navigate($url) | Out-Null 86 | } 87 | } 88 | } 89 | } 90 | catch 91 | { 92 | try 93 | { 94 | $pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager") 95 | 96 | $selection = $pmPane.TextDocument.Selection 97 | $selection.StartOfDocument($false) 98 | $selection.EndOfDocument($true) 99 | 100 | if ($selection.Text.StartsWith("Attempting to gather dependencies information for package 'Newtonsoft.Json." + $package.Version + "'")) 101 | { 102 | # don't show on upgrade 103 | if (!$selection.Text.Contains("Removed package")) 104 | { 105 | $dte2.ItemOperations.Navigate($url) | Out-Null 106 | } 107 | } 108 | } 109 | catch 110 | { 111 | # stop potential errors from bubbling up 112 | # worst case the splash page won't open 113 | } 114 | } 115 | 116 | # still yolo -------------------------------------------------------------------------------- /AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/.signature.p7s -------------------------------------------------------------------------------- /AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/System.IdentityModel.Tokens.Jwt.5.2.4.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/System.IdentityModel.Tokens.Jwt.5.2.4.nupkg -------------------------------------------------------------------------------- /AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/lib/net45/System.IdentityModel.Tokens.Jwt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/lib/net45/System.IdentityModel.Tokens.Jwt.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/lib/net45/System.IdentityModel.Tokens.Jwt.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/lib/net45/System.IdentityModel.Tokens.Jwt.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/lib/net451/System.IdentityModel.Tokens.Jwt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/lib/net451/System.IdentityModel.Tokens.Jwt.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/lib/net451/System.IdentityModel.Tokens.Jwt.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/lib/net451/System.IdentityModel.Tokens.Jwt.pdb -------------------------------------------------------------------------------- /AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/lib/netstandard1.4/System.IdentityModel.Tokens.Jwt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/lib/netstandard1.4/System.IdentityModel.Tokens.Jwt.dll -------------------------------------------------------------------------------- /AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/lib/netstandard1.4/System.IdentityModel.Tokens.Jwt.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MosheWorld/AuthenticationService/58c87af5dbe20b6e4bb877ce59be7ad24258ff7d/AuthenticationService C#/packages/System.IdentityModel.Tokens.Jwt.5.2.4/lib/netstandard1.4/System.IdentityModel.Tokens.Jwt.pdb -------------------------------------------------------------------------------- /AuthenticationService NodeJS/JWTService.js: -------------------------------------------------------------------------------- 1 | var jwt = require('jsonwebtoken'); 2 | 3 | function JWTService(secretKey) { 4 | /** 5 | * This is the variable that will store our secret key. 6 | */ 7 | var secretKey = secretKey; 8 | 9 | var methods = {}; 10 | 11 | function isObjectNullOrUndefined(object) { 12 | if (object === undefined || object === null) { 13 | return true; 14 | } else { 15 | return false; 16 | } 17 | } 18 | 19 | function isStringNullOrEmpty(str) { 20 | if (str === undefined || str === null || str === '') { 21 | return true; 22 | } else { 23 | return false; 24 | } 25 | } 26 | 27 | methods.generateToken = function (configurations) { 28 | if (isObjectNullOrUndefined(configurations)) { 29 | throw new Error('Arguments to create token are not valid.'); 30 | } 31 | 32 | return jwt.sign(configurations.data, secretKey, configurations.expireDate); 33 | } 34 | 35 | methods.isTokenValid = function (token) { 36 | if (isStringNullOrEmpty(token)) { 37 | throw new Error('Given token is null or empty.'); 38 | } 39 | 40 | try { 41 | jwt.verify(token, secretKey); 42 | return true; 43 | } catch (err) { 44 | return false; 45 | } 46 | } 47 | 48 | methods.getTokenData = function (token) { 49 | if (isStringNullOrEmpty(token)) { 50 | throw new Error('Given token is null or empty.'); 51 | } 52 | 53 | try { 54 | const decodedObject = jwt.verify(token, secretKey); 55 | return decodedObject; 56 | } catch (err) { 57 | throw err; 58 | } 59 | } 60 | 61 | return methods; 62 | } 63 | 64 | module.exports = { 65 | JWTService 66 | }; -------------------------------------------------------------------------------- /AuthenticationService NodeJS/Main.js: -------------------------------------------------------------------------------- 1 | var { JWTService } = require('./JWTService'); 2 | 3 | function getConfigurations(dataModel) { 4 | const configurations = { 5 | data: dataModel, 6 | secretKey: 'TW9zaGVFcmV6UHJpdmF0ZUtleQ==', 7 | expireDate: { 8 | expiresIn: '7d' 9 | } 10 | }; 11 | 12 | return configurations; 13 | } 14 | 15 | (function main() { 16 | try { 17 | const model = { 18 | name: 'Moshe Binieli', 19 | email: 'mmoshikoo@gmail.com' 20 | }; 21 | 22 | const configurations = getConfigurations(model); 23 | const jwtService = JWTService(configurations.secretKey); 24 | 25 | const token = jwtService.generateToken(configurations); 26 | 27 | if (!jwtService.isTokenValid(token, configurations.secretKey)) { 28 | throw new Error('Given token is not valid.'); 29 | } else { 30 | const data = jwtService.getTokenData(token, configurations.secretKey); 31 | console.log(data); 32 | } 33 | } catch (ex) { 34 | console.error(ex); 35 | } 36 | })(); 37 | -------------------------------------------------------------------------------- /AuthenticationService NodeJS/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "authenticationservice-nodejs", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "jsonwebtoken": "^8.3.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AuthenticationService 2 | 3 | The actual articles are written in medium platform, those are just the implementations. 4 | 5 | Simple JWT Authentication explanation: https://medium.com/@mmoshikoo/simple-jwt-authentication-explanation-81e930a1a01f 6 | 7 | C# Article: https://medium.com/@mmoshikoo/jwt-authentication-using-c-54e0c71f21b0 8 | 9 | NodeJS Article: https://medium.com/@mmoshikoo/jwt-authentication-using-nodejs-82a1d8fb8648 10 | 11 | Enjoy. 12 | --------------------------------------------------------------------------------