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

APEXCORE-515 Providing principal for token refresh #374

Merged
merged 1 commit into from Sep 1, 2016

Conversation

pramodin
Copy link
Contributor

@gauravgopi123 please see

@pramodin
Copy link
Contributor Author

@pradeepdalvi @vrozov please see

String keytab = null;
String keytabPath = conf.get(StramClientUtils.KEY_TAB_FILE);
if ((principal = StramUserLogin.getPrincipal()) == null) {
principal = conf.get(StramUserLogin.DT_AUTH_PRINCIPAL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the logic to get principal and keytab be encapsulated into StramUserLogin? For example:

  public static String getPrincipal(Configuration conf)
  {
    if (principal == null) {
      principal = conf.get(StramUserLogin.DT_AUTH_PRINCIPAL);
    }
    return principal;
  }

  public static String getKeytab(Configuration conf)
  {
    if (keytab == null) {
      keytab = conf.get(StramUserLogin.DT_AUTH_KEYTAB);
    }
    return keytab;
  }

@vrozov
Copy link
Member

vrozov commented Sep 1, 2016

Looks good to me. Please squash commits.

@pramodin
Copy link
Contributor Author

pramodin commented Sep 1, 2016

@vrozov thanks for your input, it led me to look at the login part again

@pramodin
Copy link
Contributor Author

pramodin commented Sep 1, 2016

squashed

@asfgit asfgit merged commit dd5e95a into apache:master Sep 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants