Search in sources :

Example 1 with AuthenticationRequest

use of org.keycloak.broker.provider.AuthenticationRequest 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));
}
Also used : AuthenticationSessionModel(org.keycloak.sessions.AuthenticationSessionModel) RootAuthenticationSessionModel(org.keycloak.sessions.RootAuthenticationSessionModel) IdentityBrokerState(org.keycloak.broker.provider.util.IdentityBrokerState) AuthenticationRequest(org.keycloak.broker.provider.AuthenticationRequest)

Aggregations

AuthenticationRequest (org.keycloak.broker.provider.AuthenticationRequest)1 IdentityBrokerState (org.keycloak.broker.provider.util.IdentityBrokerState)1 AuthenticationSessionModel (org.keycloak.sessions.AuthenticationSessionModel)1 RootAuthenticationSessionModel (org.keycloak.sessions.RootAuthenticationSessionModel)1