SSO for maven repo

Has anyone figured out a way to have Java code grab the windows/mac/linux user/pass of the logged in user and pass them along as the credentials for the maven repo, without storing the passwords in the init.gradle or anything like that? Our network policy changes passwords very frequently and one pre-coffee build could lock a user out if they changed their pass but not update the .gradle/init.gradle file.