* org.onap.dmaap
* ================================================================================
* Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Modification copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
*
*******************************************************************************/
-package org.onap.dmaap.kafkaAuthorize;
+package org.onap.dmaap.kafkaauthorize;
import java.util.Map;
-
import javax.security.auth.Subject;
import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.login.LoginException;
import javax.security.auth.spi.LoginModule;
public class PlainLoginModule1 implements LoginModule {
}
@Override
- public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState,
- Map<String, ?> options) {
+ public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
String username = (String) options.get(USERNAME_CONFIG);
if (username != null)
subject.getPublicCredentials().add(username);
}
@Override
- public boolean login() throws LoginException {
+ public boolean login() {
return true;
}
@Override
- public boolean logout() throws LoginException {
+ public boolean logout() {
return true;
}
@Override
- public boolean commit() throws LoginException {
+ public boolean commit() {
return true;
}
@Override
- public boolean abort() throws LoginException {
+ public boolean abort() {
return false;
}
}