Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...api/src/main/java/com/evolveum/midpoint/model/api/context/NonceAuthenticationContext.java
This file contains 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.evolveum.midpoint.model.api.context; | ||
|
||
import com.evolveum.midpoint.xml.ns._public.common.common_3.NonceCredentialsPolicyType; | ||
|
||
public class NonceAuthenticationContext extends AbstractAuthenticationContext { | ||
|
||
private String nonce; | ||
private NonceCredentialsPolicyType policy; | ||
|
||
public NonceAuthenticationContext(String username, String nonce, NonceCredentialsPolicyType policy) { | ||
super(username); | ||
this.nonce = nonce; | ||
this.policy = policy; | ||
} | ||
|
||
public String getNonce() { | ||
return nonce; | ||
} | ||
|
||
public NonceCredentialsPolicyType getPolicy() { | ||
return policy; | ||
} | ||
|
||
@Override | ||
public Object getEnteredCredential() { | ||
return getNonce(); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
.../src/main/java/com/evolveum/midpoint/model/api/context/PasswordAuthenticationContext.java
This file contains 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.evolveum.midpoint.model.api.context; | ||
|
||
public class PasswordAuthenticationContext extends AbstractAuthenticationContext { | ||
|
||
private String password; | ||
|
||
public String getPassword() { | ||
return password; | ||
} | ||
|
||
public PasswordAuthenticationContext(String username, String password) { | ||
super(username); | ||
this.password = password; | ||
} | ||
|
||
@Override | ||
public Object getEnteredCredential() { | ||
return getPassword(); | ||
} | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
.../java/com/evolveum/midpoint/model/api/context/SecurityQuestionsAuthenticationContext.java
This file contains 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.evolveum.midpoint.model.api.context; | ||
|
||
import java.util.Map; | ||
|
||
import com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityQuestionsCredentialsPolicyType; | ||
|
||
public class SecurityQuestionsAuthenticationContext extends AbstractAuthenticationContext{ | ||
|
||
private Map<String, String> questionAnswerMap; | ||
private SecurityQuestionsCredentialsPolicyType policy; | ||
|
||
|
||
public SecurityQuestionsAuthenticationContext(String username, Map<String, String> questionAnswerMap) { | ||
super(username); | ||
this.questionAnswerMap = questionAnswerMap; | ||
} | ||
|
||
|
||
public Map<String, String> getQuestionAnswerMap() { | ||
return questionAnswerMap; | ||
} | ||
|
||
@Override | ||
public Object getEnteredCredential() { | ||
return getQuestionAnswerMap(); | ||
} | ||
|
||
public SecurityQuestionsCredentialsPolicyType getPolicy() { | ||
return policy; | ||
} | ||
|
||
public void setPolicy(SecurityQuestionsCredentialsPolicyType policy) { | ||
this.policy = policy; | ||
} | ||
|
||
|
||
} |