public class KeycloakInstalled extends Object
Modifier and Type | Class and Description |
---|---|
static class |
KeycloakInstalled.Console |
static class |
KeycloakInstalled.DesktopProvider |
static class |
KeycloakInstalled.Pkce |
Constructor and Description |
---|
KeycloakInstalled() |
KeycloakInstalled(InputStream config) |
KeycloakInstalled(KeycloakDeployment deployment) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static KeycloakInstalled.Console |
console() |
protected String |
createAuthUrl(String redirectUri,
String state,
KeycloakInstalled.Pkce pkce) |
protected org.jboss.resteasy.client.jaxrs.ResteasyClient |
createResteasyClient() |
protected KeycloakInstalled.Pkce |
generatePkce() |
KeycloakDeployment |
getDeployment() |
IDToken |
getIdToken() |
String |
getIdTokenString() |
String |
getListenHostname() |
int |
getListenPort() |
Locale |
getLocale() |
String |
getRefreshToken() |
protected org.jboss.resteasy.client.jaxrs.ResteasyClient |
getResteasyClient() |
AccessToken |
getToken() |
AccessTokenResponse |
getTokenResponse() |
String |
getTokenString() |
String |
getTokenString(long minValidity,
TimeUnit unit) |
boolean |
isDesktopSupported() |
void |
login() |
void |
login(PrintStream printer,
Reader reader) |
boolean |
loginCommandLine() |
boolean |
loginCommandLine(String redirectUri)
Experimental proprietary WWW-Authentication challenge protocol.
|
void |
loginDesktop() |
void |
loginManual() |
void |
loginManual(PrintStream printer,
Reader reader) |
void |
logout() |
void |
refreshToken() |
void |
refreshToken(String refreshToken) |
void |
setDesktopProvider(KeycloakInstalled.DesktopProvider desktopProvider) |
void |
setListenHostname(String listenHostname)
Configures the local hostname to listen for callbacks.
|
void |
setListenPort(int listenPort)
Configures the local port to listen for callbacks.
|
void |
setLocale(Locale locale) |
void |
setResteasyClient(org.jboss.resteasy.client.jaxrs.ResteasyClient resteasyClient) |
public KeycloakInstalled()
public KeycloakInstalled(InputStream config)
public KeycloakInstalled(KeycloakDeployment deployment)
public void setResteasyClient(org.jboss.resteasy.client.jaxrs.ResteasyClient resteasyClient)
public Locale getLocale()
public void setLocale(Locale locale)
public int getListenPort()
public void setListenPort(int listenPort)
0
will choose a random port. Defaults to 0
.listenPort
- a valid port numberpublic String getListenHostname()
public void setListenHostname(String listenHostname)
0
will choose a random portlistenHostname
- a valid local hostnamepublic void login() throws IOException, ServerRequest.HttpFailure, org.keycloak.common.VerificationException, InterruptedException, OAuthErrorException, URISyntaxException
public void login(PrintStream printer, Reader reader) throws IOException, ServerRequest.HttpFailure, org.keycloak.common.VerificationException, InterruptedException, OAuthErrorException, URISyntaxException
public void logout() throws IOException, InterruptedException, URISyntaxException
public void loginDesktop() throws IOException, org.keycloak.common.VerificationException, OAuthErrorException, URISyntaxException, ServerRequest.HttpFailure, InterruptedException
public void close()
protected String createAuthUrl(String redirectUri, String state, KeycloakInstalled.Pkce pkce)
protected KeycloakInstalled.Pkce generatePkce()
public void loginManual() throws IOException, ServerRequest.HttpFailure, org.keycloak.common.VerificationException
public void loginManual(PrintStream printer, Reader reader) throws IOException, ServerRequest.HttpFailure, org.keycloak.common.VerificationException
public static KeycloakInstalled.Console console()
public boolean loginCommandLine() throws IOException, ServerRequest.HttpFailure, org.keycloak.common.VerificationException
public boolean loginCommandLine(String redirectUri) throws IOException, ServerRequest.HttpFailure, org.keycloak.common.VerificationException
redirectUri
- IOException
ServerRequest.HttpFailure
org.keycloak.common.VerificationException
protected org.jboss.resteasy.client.jaxrs.ResteasyClient getResteasyClient()
protected org.jboss.resteasy.client.jaxrs.ResteasyClient createResteasyClient()
public String getTokenString()
public String getTokenString(long minValidity, TimeUnit unit) throws org.keycloak.common.VerificationException, IOException, ServerRequest.HttpFailure
public void refreshToken() throws IOException, ServerRequest.HttpFailure, org.keycloak.common.VerificationException
public void refreshToken(String refreshToken) throws IOException, ServerRequest.HttpFailure, org.keycloak.common.VerificationException
public AccessToken getToken()
public IDToken getIdToken()
public String getIdTokenString()
public String getRefreshToken()
public AccessTokenResponse getTokenResponse()
public void setDesktopProvider(KeycloakInstalled.DesktopProvider desktopProvider)
public boolean isDesktopSupported()
public KeycloakDeployment getDeployment()
Copyright © 2021 JBoss by Red Hat. All rights reserved.