package RSApache::Response::RedirectLogin;

use strict;
use warnings;

use URI::Escape;

use lib '/app/tools/appuser/lib';
use AppUser::Login::Command::Login;

use RSApache::Response::Redirect;
use base 'RSApache::Response::Redirect';

sub _init {
    my ( $self, $returnURL ) = @_;

    my $loginCmd = AppUser::Login::Command::Login->new( redirect => uri_escape($returnURL) );

    $self->SUPER::_init( $loginCmd->getRedirect() );
}

###
1;    # Play nicely.
###

