LibWeb: Implement most CredentialsContainer
methods
#3495
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.
This PR mplements
get
,store
,create
onCredentialsContainer
.Notably, it also introduces the
CredentialInterface
abstract class to deal with credentials internal methods and metadata. It has been implemented as a singleton for each credential type. This is the design that I managed to come up with, any suggestion is appreciated.The spec isn't the best and contains some bugs:
options.signal && options.signal->aborted()
check inget
andcreate
is not deferred therefore fails two WPT testsinterfaces.size() < 1
check increate
is custom and avoids an out of bound access in the next step -> Spec issueCredentialRequestOptions
IDL dictionary has a default value forpassword
which renders the credential type always active. I think we are supposed to reject it when computing the relevant credential interface objects ifpassword
isfalse
, but that's not specifiedI'll create some spec issues and link them here even if the repository has been inactive for the last 6 months.
Lastly, I am unsure how to check
If settings’s relevant global object has no associated Document
so I've left two TODOs.