Skip to content
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

feat!: Making AccessToken Identity required #875

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

rakatyal
Copy link
Contributor

@rakatyal rakatyal commented Jan 6, 2023

JIRA: DI-2445
Making Identity required in the AccessToken constructor.

@@ -359,7 +359,9 @@ export default class AccessToken implements AccessTokenOptions {
if (!secret) {
throw new Error("secret is required");
}
options = options || {};
if (!options || !options.identity) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this first !-check needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see. Or simply !options?.identity

spec/unit/jwt/AccessToken.spec.js Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Jan 6, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@rakatyal rakatyal merged commit 43ca35f into 4.0.0-rc Jan 6, 2023
@rakatyal rakatyal deleted the accesstoken_identity branch January 6, 2023 19:41
@rakatyal
Copy link
Contributor Author

rakatyal commented Jan 6, 2023

Fixes #595

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.

None yet

2 participants