File tree Expand file tree Collapse file tree
test/CZ.AspNetCore.EasyAuthAuthentication.Test/Services Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11namespace CZ . AspNetCore . EasyAuthAuthentication . Test . Services
22{
33 using System ;
4- using System . Collections . Generic ;
54 using System . Security . Claims ;
6- using System . Text ;
75 using CZ . AspNetCore . EasyAuthAuthentication . Interfaces ;
86 using CZ . AspNetCore . EasyAuthAuthentication . Services ;
97 using Microsoft . AspNetCore . Http ;
@@ -118,7 +116,7 @@ public void IfAValidJwtTokenWithoutIdpAndIssPropertyIsInTheHeaderItsThrowsAnErro
118116 public void IfAValidJwtTokenWithoutTheClaimPropertyIsInTheHeaderItsNotThrowAnError ( )
119117 {
120118 // Arrange
121- var handler = new EasyAuthForAuthorizationTokenService ( this . loggerFactory . CreateLogger < EasyAuthForAuthorizationTokenService > ( ) ) ;
119+ IEasyAuthAuthentificationService handler = new EasyAuthForAuthorizationTokenService ( this . loggerFactory . CreateLogger < EasyAuthForAuthorizationTokenService > ( ) ) ;
122120 var httpcontext = new DefaultHttpContext ( ) ;
123121 var jwtWithoutIdpProperty = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiIwN2Q2ZDE1YS1jZTg5LTQ4MmMtOTcxYi01NDMxYjc1MTkxNjciLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC9lOTgxZGNhZi05MTk3LTQ3N2YtYmQwNi0wZTU3MmIwYjMzNDcvIiwiaWF0IjoxNTYyNjk4ODc2LCJuYmYiOjE1NjI2OTg4NzYsImV4cCI6MTU2MjcwMjc3NiwiYWlvIjoiNDJaZ1lPQmZzRzd0ZEg1ZVBpSHZvNU9QdDdyT0J3QT0iLCJhcHBpZCI6ImQzMTViZmFmLTYzMDQtNGY5Zi04MjFjLTU0NmJkYzAwYjViMCIsImFwcGlkYWNyIjoiMSIsIm9pZCI6ImY1ZjlmYTg2LTQ0MTQtNDRjNy04MGY4LWY3ODBhZTBhYmYyMSIsInN1YiI6ImY1ZjlmYTg2LTQ0MTQtNDRjNy04MGY4LWY3ODBhZTBhYmYyMSIsInRpZCI6ImU5ODFkY2FmLTkxOTctNDc3Zi1iZDA2LTBlNTcyYjBiMzM0NyIsInV0aSI6ImhDSnUzb2g3d1VlWmFpNVFKT1lBQUEiLCJ2ZXIiOiIxLjAifQ.HFVt3Moojs3G7J5CoqfJ8lDtxUf3SsO1bGb8_9O-314" ;
124122 httpcontext . Request . Headers . Add ( "Authorization" , jwtWithoutIdpProperty ) ;
You can’t perform that action at this time.
0 commit comments