use of org.keycloak.broker.provider.util.IdentityBrokerState in project keycloak by keycloak.
the class IdentityBrokerService method getAndVerifyAuthenticationSession.
@Override
public AuthenticationSessionModel getAndVerifyAuthenticationSession(String encodedCode) {
IdentityBrokerState state = IdentityBrokerState.encoded(encodedCode);
String code = state.getDecodedState();
String clientId = state.getClientId();
String tabId = state.getTabId();
return parseSessionCode(code, clientId, tabId);
}
use of org.keycloak.broker.provider.util.IdentityBrokerState in project keycloak by keycloak.
the class IdentityBrokerService method createAuthenticationRequest.
private AuthenticationRequest createAuthenticationRequest(String providerId, ClientSessionCode<AuthenticationSessionModel> clientSessionCode) {
AuthenticationSessionModel authSession = null;
IdentityBrokerState encodedState = null;
if (clientSessionCode != null) {
authSession = clientSessionCode.getClientSession();
String relayState = clientSessionCode.getOrGenerateCode();
encodedState = IdentityBrokerState.decoded(relayState, authSession.getClient().getClientId(), authSession.getTabId());
}
return new AuthenticationRequest(this.session, this.realmModel, authSession, this.request, this.session.getContext().getUri(), encodedState, getRedirectUri(providerId));
}
Aggregations