Example usage for com.intellij.openapi.util PasswordUtil decodePassword

List of usage examples for com.intellij.openapi.util PasswordUtil decodePassword

Introduction

In this page you can find the example usage for com.intellij.openapi.util PasswordUtil decodePassword.

Prototype

public static String decodePassword(@Nullable String password) throws NumberFormatException 

Source Link

Usage

From source file:com.intellij.remotesdk.RemoteCredentialsHolder.java

License:Apache License

public void setSerializedPassword(String serializedPassword) {
    if (!StringUtil.isEmpty(serializedPassword)) {
        myPassword = PasswordUtil.decodePassword(serializedPassword);
        myStorePassword = true;//from   ww  w  . jav  a 2 s . com
    } else {
        myPassword = null;
    }
}

From source file:com.intellij.remotesdk.RemoteCredentialsHolder.java

License:Apache License

public void setSerializedPassphrase(String serializedPassphrase) {
    if (!StringUtil.isEmpty(serializedPassphrase)) {
        myPassphrase = PasswordUtil.decodePassword(serializedPassphrase);
        myStorePassphrase = true;//from ww w. j av  a  2s.c o  m
    } else {
        myPassphrase = null;
        myStorePassphrase = false;
    }
}

From source file:com.intellij.tasks.impl.BaseRepository.java

License:Apache License

public void setEncodedPassword(String password) {
    try {//from  www . jav  a2s. c om
        setPassword(PasswordUtil.decodePassword(password));
    } catch (NumberFormatException e) {
        // do nothing
    }
}

From source file:com.targetprocess.intellij.TargetProcessSettings.java

License:Open Source License

public void setEncodedPassword(final String password) {
    try {//from w w w.jav  a2s.c  o  m
        setPassword(PasswordUtil.decodePassword(password));
    } catch (NumberFormatException e) {
        // do nothing
    }
}

From source file:org.coding.git.tasks.CodingNetRepository.java

License:Apache License

public void setEncodedToken(String password) {
    try {/* w  w w  .  j a  v a  2  s.  c om*/
        setToken(PasswordUtil.decodePassword(password));
    } catch (NumberFormatException e) {
        LOG.warn("Can't decode token", e);
    }
}

From source file:org.jetbrains.tfsIntegration.core.configuration.Credentials.java

License:Apache License

public void setEncodedPassword(String encodedPassword) {
    myPassword = encodedPassword != null ? PasswordUtil.decodePassword(encodedPassword) : null;
    myStorePassword = true;
}

From source file:org.jfrog.idea.configuration.XrayServerConfig.java

License:Open Source License

@CheckForNull
public String getPassword() {
    if (password == null) {
        return null;
    }/* w w w . j av  a2 s. c  o  m*/
    try {
        return PasswordUtil.decodePassword(password);
    } catch (NumberFormatException e) {
        return null;
    }
}

From source file:org.qi4j.chronos.UserConfig.java

License:Open Source License

public void readUserConfig() {
    FileInputStream fileInputStream = null;

    try {//  w ww.j a v  a 2 s. c  o  m
        Properties properties = new Properties();

        File chronosDir = ChronosUtil.getChronosDir();

        File userConfigFile = new File(chronosDir, USER_CONFIG_FILE);

        if (!userConfigFile.exists()) {
            return;
        }

        fileInputStream = new FileInputStream(userConfigFile);

        properties.load(fileInputStream);

        loginId = properties.getProperty(LOGINID);
        password = PasswordUtil.decodePassword(properties.getProperty(PASSWORD));
    } catch (Exception err) {
        //TODO bp. handle err
        err.printStackTrace();
    } finally {
        if (fileInputStream != null) {
            try {
                fileInputStream.close();
            } catch (IOException ioErr) {
                //ignore it
            }
        }
    }
}

From source file:org.sonarlint.intellij.config.global.SonarQubeServer.java

License:Open Source License

public void setEncodedToken(String token) {
    try {/*from   w w w .j  a  v  a2s . com*/
        setToken(PasswordUtil.decodePassword(token));
    } catch (NumberFormatException e) {
        // do nothing
    }
}