add username flag for token command
This PR allows us to pass the username as a flag to the rancher token command so it does not need to be input each time. This is helpful in Kubernetes configs when defining the login command for a given cluster.
Example
$ ranch token --server=my-server --user=my-user --cluster=my-cluster --auth-provider=activeDirectoryProvider --username=my-username
Enter credentials for activeDirectoryProvider
Enter password:
As we can see it no longer asks for a username if one is passed in.
In our environment there is no relation. It is setup so the userId is the name of the cluster and is therefore the same for everyone connecting to that cluster. Since we're using an auth provider, the username is what's passed to Active Directory to identify the client during login.
Does it make sense to support --password or RANCHER_PASSWORD env variable. I think this is valid in non-interactive process like CICD.
Why not support both? The --password flag is useful for my kubectl config login command.
@billiford will you add password support as well? maybe name them --authUser and --authPassword to differentiate from --user
I'd be happy to change this to --authUser in this PR, but I think anything involving a password should take place in a separate PR.