public class KcinitDriver extends Object
1. . kcinit - setup and export KC_SESSION_KEY env var if not set. - checks to see if master token valid, refresh is possible, exit if token valid - performs command line login - stores master token for master client 2. app.sh is a wrapper for app cli. - token=`kcinit token app` - checks to see if token for app client has been fetched, refresh if valid, output token to sys.out if exists - if no token, login. Prompts go to stderr. - pass token as cmd line param to app or as environment variable.
3. kcinit password {password} - outputs password key that is used for encryption. - can be used in .bashrc as export KC_SESSSION_KEY=`kcinit password {password}` or just set it in .bat file
Modifier and Type | Field and Description |
---|---|
protected boolean |
browserLogin |
protected Map<String,String> |
config |
protected boolean |
debug |
protected boolean |
encrypted |
protected String |
encryptionKey |
protected boolean |
forceLogin |
static String |
KC_LOGIN_CONFIG_PATH |
static String |
KC_SESSION_KEY |
protected static byte[] |
salt |
Constructor and Description |
---|
KcinitDriver() |
public static final String KC_SESSION_KEY
public static final String KC_LOGIN_CONFIG_PATH
protected boolean debug
protected static byte[] salt
protected boolean forceLogin
protected boolean browserLogin
protected String encryptionKey
protected boolean encrypted
public String getHome()
public void passwordKey()
protected String generateEncryptionKey(String password) throws NoSuchAlgorithmException, InvalidKeySpecException
public JWE createJWE()
protected String getEncryptionKey()
public File getConfigDirectory()
public File getConfigFile()
public File getTokenDirectory()
protected void checkEnv()
protected void promptLocalPassword()
protected byte[] readFileRaw(File fp) throws IOException
IOException
public void install()
public void printHelp()
public AdapterConfig getConfig()
protected String getMasterClientSecret()
protected String getServer()
protected String getRealm()
protected boolean forceLogin()
public javax.ws.rs.client.Client getHttpClient()
Copyright © 2021 JBoss by Red Hat. All rights reserved.