You can use the APEX_CREDENTIAL package to change stored credentials either persistently or for the current APEX session only.
APEX_CREDENTIAL
Scripting on this page enhances content navigation, but does not change the content in any way.