-
Notifications
You must be signed in to change notification settings - Fork 144
feat(auth): enables OIDC auth code flow #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0105964
Enable OIDC auth code flow
d49e5ab
Changes requested by hiranya911
b013c48
More changes requested by hiranya911
313bf19
Update FirebaseAdmin/FirebaseAdmin.Tests/Auth/Providers/OidcProviderC…
ScruffyProdigy 4a75862
Update FirebaseAdmin/FirebaseAdmin.Tests/Auth/Providers/OidcProviderC…
ScruffyProdigy e394087
Update FirebaseAdmin/FirebaseAdmin.Tests/Auth/Providers/OidcProviderC…
ScruffyProdigy 2698574
Update FirebaseAdmin/FirebaseAdmin.Tests/Auth/Providers/OidcProviderC…
ScruffyProdigy f6ec0be
Update FirebaseAdmin/FirebaseAdmin/Auth/Providers/OidcProviderConfig.cs
ScruffyProdigy c574aed
Update FirebaseAdmin/FirebaseAdmin/Auth/Providers/OidcProviderConfigA…
ScruffyProdigy 46b448b
Update FirebaseAdmin/FirebaseAdmin/Auth/Providers/OidcProviderConfigA…
ScruffyProdigy 515ea37
Update FirebaseAdmin/FirebaseAdmin/Auth/Providers/OidcProviderConfigA…
ScruffyProdigy 90e131e
Update FirebaseAdmin/FirebaseAdmin/Auth/Providers/OidcProviderConfigA…
ScruffyProdigy bda0561
Update FirebaseAdmin/FirebaseAdmin/Auth/Providers/OidcProviderConfigA…
ScruffyProdigy 7e4000a
Fixing tests
cb54162
Fixing tests
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -27,6 +27,9 @@ internal OidcProviderConfig(Request request) | |||||
{ | ||||||
this.ClientId = request.ClientId; | ||||||
this.Issuer = request.Issuer; | ||||||
this.ClientSecret = request.ClientSecret; | ||||||
this.IdTokenResponseType = request.ResponseType.IdToken == true; | ||||||
this.CodeResponseType = request.ResponseType.Code == true; | ||||||
} | ||||||
|
||||||
/// <summary> | ||||||
|
@@ -63,13 +66,43 @@ internal OidcProviderConfig(Request request) | |||||
/// </summary> | ||||||
public string Issuer { get; } | ||||||
|
||||||
/// <summary> | ||||||
/// Gets the Client Secret used to verify code based response types. | ||||||
ScruffyProdigy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
/// </summary> | ||||||
public string ClientSecret { get; } | ||||||
|
||||||
/// <summary> | ||||||
/// Gets a value indicating whether an ID Token response type will be provided. | ||||||
/// </summary> | ||||||
public bool IdTokenResponseType { get; } | ||||||
|
||||||
/// <summary> | ||||||
/// Gets a value indicating whether an Code type response type will be provided. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
/// </summary> | ||||||
public bool CodeResponseType { get; } | ||||||
|
||||||
internal sealed class ResponseTypeInfo | ||||||
{ | ||||||
[JsonProperty("code")] | ||||||
internal bool? Code { get; set; } | ||||||
|
||||||
[JsonProperty("idToken")] | ||||||
internal bool? IdToken { get; set; } | ||||||
} | ||||||
|
||||||
internal sealed new class Request : AuthProviderConfig.Request | ||||||
{ | ||||||
[JsonProperty("clientId")] | ||||||
internal string ClientId { get; set; } | ||||||
|
||||||
[JsonProperty("issuer")] | ||||||
internal string Issuer { get; set; } | ||||||
|
||||||
[JsonProperty("clientSecret")] | ||||||
internal string ClientSecret { get; set; } | ||||||
|
||||||
[JsonProperty("responseType")] | ||||||
internal ResponseTypeInfo ResponseType { get; set; } | ||||||
} | ||||||
} | ||||||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.