Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
fixup! rh-che #541: Login to user project using oc CLI in workspace c…
Browse files Browse the repository at this point in the history
…ontainers
  • Loading branch information
Oleksandr Garagatyi committed Feb 27, 2018
1 parent 72acec8 commit 797b022
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.slf4j.Logger;

import javax.inject.Inject;
import javax.inject.Named;

import static java.lang.String.format;
import static org.slf4j.LoggerFactory.getLogger;
Expand All @@ -28,15 +27,12 @@
public class OsoUserTokenInjector {
private static final Logger LOG = getLogger(OsoUserTokenInjector.class);

private final String fabric8UserServiceEndpoint;
private final OpenshiftUserTokenProvider openshiftUserTokenProvider;
private final TenantDataProvider tenantDataProvider;

@Inject
public OsoUserTokenInjector(@Named("che.fabric8.user_service.endpoint") String fabric8UserServiceEndpoint,
OpenshiftUserTokenProvider openshiftUserTokenProvider,
public OsoUserTokenInjector(OpenshiftUserTokenProvider openshiftUserTokenProvider,
TenantDataProvider tenantDataProvider) {
this.fabric8UserServiceEndpoint = fabric8UserServiceEndpoint;
this.openshiftUserTokenProvider = openshiftUserTokenProvider;
this.tenantDataProvider = tenantDataProvider;
}
Expand Down Expand Up @@ -75,6 +71,7 @@ public void injectToken(Subject subject) {
// 1. Get OSO token for the user from keycloak
// 2. Get OSO cluster and namespace (if namespace with type=user is available)
// 3. Execute oc login against all the containers (or just the dev one)
// 4. Execute oc project <namespace>
}

private String getUserDescription(Subject subject) {
Expand Down

0 comments on commit 797b022

Please sign in to comment.