You can access this classes with java stubs from solution MPS.IDEA, model com.intellij.credentialStore@java_stub.
There is com.intellij.ide.passwordSafe.PasswordSafe class with methods: com.intellij.credentialStore.CredentialStore#get(@NotNull CredentialAttributes attributes) com.intellij.credentialStore.CredentialStore#set(@NotNull CredentialAttributes attributes, @Nullable Credentials credentials)
Where CredentialAttributes contains your service name, user name, and class, while Credentials contains username and password.
There is build in mechanism in Idea platform.
You can read about it here: https://github.com/JetBrains/intellij-community/blob/master/platform/credential-store/readme.md
You can access this classes with java stubs from solution MPS.IDEA, model com.intellij.credentialStore@java_stub.
There is com.intellij.ide.passwordSafe.PasswordSafe class with methods:
com.intellij.credentialStore.CredentialStore#get(@NotNull CredentialAttributes attributes)
com.intellij.credentialStore.CredentialStore#set(@NotNull CredentialAttributes attributes, @Nullable Credentials credentials)
Where CredentialAttributes contains your service name, user name, and class, while Credentials contains username and password.