誰かが私にこれを手伝ってもらえるように、私はそれを数日間試しています。私はAndroidアプリを構築し、Amazon Cognitoログインを統合しています。 管理パネルを使用してAmazon Cognitoでのみ管理者としてユーザーを作成したいと考えています。その際、ユーザーがパスワードを変更する必要があります。匿名クラスであるCognitoUserPoolSignInProviderの中で、私は匿名クラスに次のコードを持って新しいパスワードでユーザーを認証するために:AWS Cognito新しいパスワードの継続 - Android
@Override
public void authenticationChallenge(final ChallengeContinuation continuation) {
if ("NEW_PASSWORD_REQUIRED".equals(continuation.getChallengeName())) {
NewPasswordContinuation newPasswordContinuation = (NewPasswordContinuation) continuation;
newPasswordContinuation.setPassword("users new password goes here");
continuation.continueTask();
}
}
私はChangePassword
と呼ばれる別のActivityクラスを持っています。これはユーザインターフェイスにリンクし、ユーザからの編集テキストボックスに入力を取得します。
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_change_password);
password = (EditText) findViewById(R.id.newPassword);
submit = (Button) findViewById(R.id.submit);
String pass = password.getText().toString();
新しいパスワードを設定するために匿名クラスにユーザーを入力するにはどうすればよいですか? 助けを借りてありがとうございます