Well if your credentials are a simple type e.g. API key only, then that would be fine as a dedicated credentials type. but I still would not be putting the device stuff in the credential.
So the simple rule I would like people to follow is this: If you think you need a new type, only create a new type if the value *cannot* be common with another consumer. So password's are typically common with other consumers because users can have SSO and thus the same password works on multiple systems. An application type specific key, on the other hand, that could only be used by that application, so a dedicated credential type is fine. But only store the credential... On 17 October 2014 16:48, Hakan Tandoğan <[email protected]> wrote: > Because the devices actually are part of the account. At least currently, > there is no way for one specific device to belong to multiple PB accounts. > > If I get you correctly, I would create some plugin that manages the device > list, which in turn would ask the credentials providers for generic > credentials, which happen to be the API key instead entered in the password > field of the plain-credentials-provider. > > Overall, on the first consumer ( the pushbullet-notifier-plugin which I am > also writing ), I lose the tight type / purpose coupling between credential > and consumer. And as soon as I need a second consumer, I would need to > duplicate the logic and code for obtaining the list of devices, choosing > the appropriate ones etc etc etc. I guess my only defense is that having a > dedicated credential type just feels tidier to me :-) > > On Friday, October 17, 2014 5:18:08 PM UTC+2, Stephen Connolly wrote: >> >> But why would you store the devices with the credential? >> >> It would make more sense to me that you keep the devices elsewhere and >> just inject a standard user/password into whatever manages the list of >> devices >> >> >> -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
