Uploaded image for project: 'OpenShift Java Client'
  1. OpenShift Java Client
  2. OSJC-128

separate the 3 different authorizations methods we currently support

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 2.7.0
    • 2.7.0
    • core
    • None

      cOne can currently authorize via username/password, keys and authorization tokens in openshift-java-client:

      • username/password(username, password)
        OpenShiftConnectionFactory
        public IOpenShiftConnection getConnection(final String clientId, final String username, final String password)
        
      • keys (authKey, authIV)
        OpenShiftConnectionFactory
        public IOpenShiftConnection getConnection(final String clientId, final String username, final String password,
        			final String authKey, final String authIV, final String serverUrl) throws OpenShiftException {
        
      • authorization token (token)
        OpenShiftConnectionFactory
        public IOpenShiftConnection getConnection(final String clientId, final String username, final String password,
        			final String authKey, final String authIV, final String token, final String serverUrl,
        			final ISSLCertificateCallback sslCertificateCallback) throws OpenShiftException {
        

      As can be seen above the different variants are added to the #getConnection method in form of additional parameters. Since the 3 forms are alternative we should have different methods which ONLY have the distinct parameters.
      Having a builder would be most likely the best option but different overloads could work too.

            adietish@redhat.com André Dietisheim
            adietish@redhat.com André Dietisheim
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: