public class IdentityBrokerService extends Object implements IdentityProvider.AuthenticationCallback
| Constructor and Description |
|---|
IdentityBrokerService(RealmModel realmModel) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
afterFirstBrokerLogin(String code) |
javax.ws.rs.core.Response |
afterPostBrokerLoginFlow(String code) |
javax.ws.rs.core.Response |
authenticated(BrokeredIdentityContext context) |
protected javax.ws.rs.core.Response |
browserAuthentication(ClientSessionModel clientSession,
String errorMessage) |
javax.ws.rs.core.Response |
cancelled(String code) |
javax.ws.rs.core.Response |
error(String code,
String message) |
Object |
getEndpoint(String providerId) |
static IdentityProvider |
getIdentityProvider(KeycloakSession session,
RealmModel realm,
String alias) |
void |
init() |
protected boolean |
isClientSessionRegistered(String code)
Returns
true if the client session is defined for the given code
in the current session and for the current realm. |
javax.ws.rs.core.Response |
performLogin(String providerId,
String code) |
javax.ws.rs.core.Response |
performPostLogin(String providerId,
String code) |
javax.ws.rs.core.Response |
retrieveToken(String providerId) |
javax.ws.rs.core.Response |
retrieveTokenPreflight() |
javax.ws.rs.core.Response |
validateUser(UserModel user,
RealmModel realm) |
public IdentityBrokerService(RealmModel realmModel)
public void init()
@POST
@Path(value="/{provider_id}/login")
public javax.ws.rs.core.Response performPostLogin(@PathParam(value="provider_id")
String providerId,
@QueryParam(value="code")
String code)
@GET
@Path(value="/{provider_id}/login")
public javax.ws.rs.core.Response performLogin(@PathParam(value="provider_id")
String providerId,
@QueryParam(value="code")
String code)
@Path(value="{provider_id}/endpoint")
public Object getEndpoint(@PathParam(value="provider_id")
String providerId)
@Path(value="{provider_id}/token")
@OPTIONS
public javax.ws.rs.core.Response retrieveTokenPreflight()
@GET
@Path(value="{provider_id}/token")
public javax.ws.rs.core.Response retrieveToken(@PathParam(value="provider_id")
String providerId)
public javax.ws.rs.core.Response authenticated(BrokeredIdentityContext context)
authenticated in interface IdentityProvider.AuthenticationCallbackpublic javax.ws.rs.core.Response validateUser(UserModel user, RealmModel realm)
@GET
@Path(value="/after-first-broker-login")
public javax.ws.rs.core.Response afterFirstBrokerLogin(@QueryParam(value="code")
String code)
@GET
@Path(value="/after-post-broker-login")
public javax.ws.rs.core.Response afterPostBrokerLoginFlow(@QueryParam(value="code")
String code)
public javax.ws.rs.core.Response cancelled(String code)
cancelled in interface IdentityProvider.AuthenticationCallbackpublic javax.ws.rs.core.Response error(String code, String message)
error in interface IdentityProvider.AuthenticationCallbackprotected boolean isClientSessionRegistered(String code)
true if the client session is defined for the given code
in the current session and for the current realm.
Does not check the session validity. To obtain client session if
and only if it exists and is valid, use ClientSessionCode.parse(java.lang.String, org.keycloak.models.KeycloakSession, org.keycloak.models.RealmModel).code - protected javax.ws.rs.core.Response browserAuthentication(ClientSessionModel clientSession, String errorMessage)
public static IdentityProvider getIdentityProvider(KeycloakSession session, RealmModel realm, String alias)
Copyright © 2017 JBoss by Red Hat. All rights reserved.