Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to make https to Dropbox Redirect URL

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.09k
    Comment on it

    Hello Guys,

    As Dropbox was not allowing HTTP URL's for callback or redirect URL's (as http was only allowed for localhost).


    I added below redirect URI in dropbox App for local machine :

    http://localhost:8080/DropboxTest/oauth_callback

    Now, We need to move code on live server or production server then dropbox allow only HTTPS URI for redirection as below :

    https://192.168.1.43:8443/DropboxTest/oauth_callback

    In above URI, I have changed port to 8443 for SSL.

    So, We need to enable SSL on given port number(8443) and add connector as below in server.xml in appache tomcat server.

     

    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.1,TLSv1" keystoreFile="/home/bhagwan/Software/ssslkeystore" keystorePass="admin123456"/>

     Here, "ssslkeystore" is needed which is attached along this blog.

    Now, add below lines in web.xml of your project

     

    <!-- SSL configuration -->
         <security-constraint>
              <web-resource-collection>
                  <web-resource-name>dropbox</web-resource-name>
                  <url-pattern>/oauth_callback</url-pattern>
              </web-resource-collection>    
              <user-data-constraint>
                  <transport-guarantee>CONFIDENTIAL</transport-guarantee>
              </user-data-constraint>
          </security-constraint>
     <!-- End SSL configuration -->

    Restart your server and deploy your project, now everything should work fine.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: