File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed
Authentication.Test/Helpers Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public void GraphSessionShouldBeInitilizedAfterInitializerIsCalled()
1515 }
1616
1717 [ Fact ]
18- public void ShoudlOverwriteExistingGraphSession ( )
18+ public void ShouldOverwriteExistingGraphSession ( )
1919 {
2020 GraphSessionInitializer . InitializeSession ( ) ;
2121 Guid originalSessionId = GraphSession . Instance . _graphSessionId ;
@@ -27,7 +27,7 @@ public void ShoudlOverwriteExistingGraphSession()
2727 }
2828
2929 [ Fact ]
30- public void ShoudlNotOverwriteExistingGraphSession ( )
30+ public void ShouldNotOverwriteExistingGraphSession ( )
3131 {
3232 GraphSessionInitializer . InitializeSession ( ) ;
3333 Guid originalSessionId = GraphSession . Instance . _graphSessionId ;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ protected override void ProcessRecord()
3131
3232 AuthenticationHelpers . Logout ( authConfig ) ;
3333
34- SessionState . PSVariable . Remove ( Constants . GraphAuthConfigId ) ;
34+ GraphSession . Instance . AuthContext = null ;
3535 }
3636
3737 protected override void StopProcessing ( )
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ namespace Microsoft.Graph.PowerShell.Authentication
77 using System ;
88 using System . Threading ;
99 /// <summary>
10- /// The current <see cref="GraphSession"/>.
10+ /// Contains methods to create, modify or obtain a thread safe static instance of <see cref="GraphSession"/>.
1111 /// </summary>
12- public class GraphSession : IGraphSession
12+ public class GraphSession : IGraphSession
1313 {
1414 static GraphSession _instance ;
1515 static bool _initialized = false ;
@@ -50,6 +50,9 @@ public static GraphSession Instance
5050 }
5151 }
5252 }
53+ /// <summary>
54+ /// Creates a new GraphSession.
55+ /// </summary>
5356 public GraphSession ( )
5457 {
5558 _graphSessionId = Guid . NewGuid ( ) ;
Original file line number Diff line number Diff line change 33// ------------------------------------------------------------------------------
44namespace Microsoft . Graph . PowerShell . Authentication
55{
6- using Newtonsoft . Json ;
76 public class AuthContext : IAuthContext
87 {
9- [ JsonIgnore ]
108 private const string PowerShellClientId = "14d82eec-204b-4c2f-b7e8-296a70dab67e" ;
119 public string ClientId { get ; set ; }
1210 public string TenantId { get ; set ; }
You can’t perform that action at this time.
0 commit comments