This pull request adds the possibility to use JClouds for OpenStack with a pre-existing Keystone token. Cf. http://developer.openstack.org/api-ref/identity/v2/?expanded=authenticate-detail
To authenticate with a tenant name and a token, you can do: ``` Properties config = new Properties(); config.setProperty(KeystoneProperties.CREDENTIAL_TYPE, CredentialTypes.TOKEN_CREDENTIALS); ContextBuilder.newBuilder("openstack-neutron") .overrides(config) .credentials("tenantname:", "hereisthetoken") ... ``` To authenticate with a tenant ID and a token, you can do: ``` Properties config = new Properties(); config.setProperty(KeystoneProperties.CREDENTIAL_TYPE, CredentialTypes.TOKEN_CREDENTIALS); config.setProperty(KeystoneProperties.TENANT_ID, "tenantid"); ContextBuilder.newBuilder("openstack-neutron") .overrides(config) .credentials("", "hereisthetoken") ... ``` NB1: auto-value is added to the project `openstack-keystone` because this is JCloud's good practice (https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49578594#API/ProviderWritingPractices-(Start)UsingAuto-Valueforallvaluetypes) NB2: `@CredentialType` is made `@Inherited` because the AutoValue concrete class must have the annotation. You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds/pull/1009 -- Commit Summary -- * Add keystone authentication with an existing token -- File Changes -- M apis/openstack-keystone/pom.xml (5) M apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/AuthenticationApi.java (26) M apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/config/CredentialType.java (2) M apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/config/CredentialTypes.java (2) M apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/config/KeystoneAuthenticationModule.java (2) M apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/config/KeystoneProperties.java (1) A apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/domain/TokenCredentials.java (53) A apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/functions/AuthenticateTokenCredentials.java (59) M apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/functions/internal/BaseAuthenticator.java (8) -- Patch Links -- https://github.com/jclouds/jclouds/pull/1009.patch https://github.com/jclouds/jclouds/pull/1009.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/1009