class OAuth10RedirectionActionBuilder implements RedirectionActionBuilder {

    protected OAuth10Configuration configuration;

    protected IndirectClient client;

    /**
     * <p>Constructor for OAuth10RedirectionActionBuilder.</p>
     *
     * @param configuration a {@link OAuth10Configuration} object
     * @param client a {@link IndirectClient} object
     */
    public OAuth10RedirectionActionBuilder(final OAuth10Configuration configuration, final IndirectClient client) {
        CommonHelper.assertNotNull("client", client);
        CommonHelper.assertNotNull("configuration", configuration);
        this.configuration = configuration;
        this.client = client;
    }

    /** {@inheritDoc} */
    @Override
    public Optional<RedirectionAction> getRedirectionAction(final CallContext ctx) {<FILL_FUNCTION_BODY>}
}

        try {

            val webContext = ctx.webContext();

            val service = (OAuth10aService) this.configuration.buildService(webContext, client);
            final OAuth1RequestToken requestToken;
            try {
                requestToken = service.getRequestToken();
            } catch (final IOException | InterruptedException | ExecutionException e) {
                throw new HttpCommunicationException("Error getting token: " + e.getMessage());
            }
            LOGGER.debug("requestToken: {}", requestToken);
            // save requestToken in user session
            ctx.sessionStore().set(webContext, configuration.getRequestTokenSessionAttributeName(client.getName()), requestToken);
            val authorizationUrl = service.getAuthorizationUrl(requestToken);
            LOGGER.debug("authorizationUrl: {}", authorizationUrl);
            return Optional.of(HttpActionHelper.buildRedirectUrlAction(webContext, authorizationUrl));

        } catch (final OAuthException e) {
            throw new TechnicalException(e);
        }
    
<no_super_class>