This is a feature that was mentioned in issue #9 but doesn't seem to have been implemented with the added support for Google oauth.
I want to add the plugin to our teamcity setup that has existing accounts with a user name like "bob" and email address "bob@example.com" so that our users can use oauth to the GSuite account on our example.com domain. The plugin works fine except that an oauth login to bob@example.com requires the user name in the TeamCity account to be bob@example.com. The way it is now to add oauth to our setup we would have to change the username on all accounts to be the email address.
I would like the ability to specify that the oauth login look for a user whose email address matches the email address returned from Google. It looks like a small change in ServerPrinicipalFactory.findExistingPrincipal(userName) would do it. If you like the idea but want a PR I could take a stab at it if you could give me a hint as to how to use the TeamCity API to look up a user by email address.
This is a feature that was mentioned in issue #9 but doesn't seem to have been implemented with the added support for Google oauth.
I want to add the plugin to our teamcity setup that has existing accounts with a user name like "bob" and email address "bob@example.com" so that our users can use oauth to the GSuite account on our example.com domain. The plugin works fine except that an oauth login to bob@example.com requires the user name in the TeamCity account to be bob@example.com. The way it is now to add oauth to our setup we would have to change the username on all accounts to be the email address.
I would like the ability to specify that the oauth login look for a user whose email address matches the email address returned from Google. It looks like a small change in ServerPrinicipalFactory.findExistingPrincipal(userName) would do it. If you like the idea but want a PR I could take a stab at it if you could give me a hint as to how to use the TeamCity API to look up a user by email address.