Revamp credential related utilities as CredentialServiceProvider.