Skip to content

Validate user identity and roles before hub name.#314

Open
EvanSchallerer wants to merge 1 commit intomicrosoft:mainfrom
EvanSchallerer:issue/313-validate-identity-before-task-hub-name
Open

Validate user identity and roles before hub name.#314
EvanSchallerer wants to merge 1 commit intomicrosoft:mainfrom
EvanSchallerer:issue/313-validate-identity-before-task-hub-name

Conversation

@EvanSchallerer
Copy link
Copy Markdown

Validates the user's identity before validating the hub name.

Closes #313

@EvanSchallerer
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Cosmos Data Technologies, Inc."

// Starting with nonce (used when running as a VsCode extension)
if (IsNonceSetAndValid(headers))
{
await ThrowIfTaskHubNameIsInvalid(taskHubName);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To simplify the logic (so that you don't have to call ThrowIfTaskHubNameIsInvalid() in four different places) consider just excluding task hub name validation from this method and instead validate it as the next step, after ValidateIdentityAsync() is being called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Identity should be validated before validating the task hub name.

2 participants