-
Notifications
You must be signed in to change notification settings - Fork 9
[ CDM-243 ] [ CDM-245 ] Orcid Provider MFA Support & Token response mfa
key
#471
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
base: develop
Are you sure you want to change the base?
Changes from 13 commits
e78616e
984fdb2
e23c5dd
5255abf
99f0573
748c8a2
589d52a
099ca8d
4cbf2ec
ef094fd
ac606a5
9dfc0a7
53ed176
ae74a21
935f193
7bbf759
3d9e93e
8d85ad9
2db7814
328704c
90ce1af
58a2aec
c766704
37d2ef6
62d6066
f45fb6e
bd080e6
ec619c6
d43d01e
6768eaf
bba441b
c46b2da
697b8c9
164e3cb
a4a0262
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -745,13 +745,19 @@ public void forceResetAllPasswords(final IncomingToken token) | |||||||||||||||
|
||||||||||||||||
private NewToken login(final UserName userName, final TokenCreationContext tokenCtx) | ||||||||||||||||
throws AuthStorageException { | ||||||||||||||||
return login(userName, tokenCtx, false); | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
private NewToken login(final UserName userName, final TokenCreationContext tokenCtx, | ||||||||||||||||
final Boolean mfaAuthenticated) throws AuthStorageException { | ||||||||||||||||
final NewToken nt = new NewToken(StoredToken.getBuilder( | ||||||||||||||||
TokenType.LOGIN, randGen.randomUUID(), userName) | ||||||||||||||||
.withLifeTime(clock.instant(), | ||||||||||||||||
cfg.getAppConfig().getTokenLifetimeMS(TokenLifetimeType.LOGIN)) | ||||||||||||||||
.withContext(tokenCtx) | ||||||||||||||||
.build(), | ||||||||||||||||
randGen.getToken()); | ||||||||||||||||
TokenType.LOGIN, randGen.randomUUID(), userName) | ||||||||||||||||
.withLifeTime(clock.instant(), | ||||||||||||||||
cfg.getAppConfig().getTokenLifetimeMS(TokenLifetimeType.LOGIN)) | ||||||||||||||||
.withContext(tokenCtx) | ||||||||||||||||
.withMfaAuthenticated(mfaAuthenticated) | ||||||||||||||||
.build(), | ||||||||||||||||
randGen.getToken()); | ||||||||||||||||
storage.storeToken(nt.getStoredToken(), nt.getTokenHash()); | ||||||||||||||||
setLastLogin(userName); | ||||||||||||||||
logInfo("Logged in user {} with token {}", | ||||||||||||||||
|
@@ -905,7 +911,9 @@ public NewToken createToken( | |||||||||||||||
final NewToken nt = new NewToken(StoredToken.getBuilder(tokenType, id, au.getUserName()) | ||||||||||||||||
.withLifeTime(clock.instant(), life) | ||||||||||||||||
.withContext(tokenCtx) | ||||||||||||||||
.withTokenName(tokenName).build(), | ||||||||||||||||
.withTokenName(tokenName) | ||||||||||||||||
.withMfaAuthenticated(null) // Agent/Dev/Serv tokens don't have MFA status | ||||||||||||||||
|
public enum Role { |
public enum TokenType { |
Can we make the new enum the same?
dauglyon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
dauglyon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
/** Get the external configuration without providing any credentials. | |
} | |
/** Get the external configuration without providing any credentials. |
Uh oh!
There was an error while loading. Please reload this page.