Git Product home page Git Product logo

android_ntlm's People

Contributors

denisshikunets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android_ntlm's Issues

Bad base-64 exception

Hi, Im getting the following error when trying to login via EWS on our office 365 account. I

Wonder if you have come accross this issue:

2019-06-14 16:24:44.061 8422-8541/com.example.app W/System.err: java.lang.IllegalArgumentException: bad base-64
2019-06-14 16:24:44.061 8422-8541/com.example.app W/System.err:     at android.util.Base64.decode(Base64.java:161)
2019-06-14 16:24:44.062 8422-8541/com.example.app W/System.err:     at android.util.Base64.decode(Base64.java:136)
2019-06-14 16:24:44.062 8422-8541/com.example.app W/System.err:     at com.netcosports.ntlm.NTLMEngineImpl$NTLMMessage.<init>(NTLMEngineImpl.java:885)
2019-06-14 16:24:44.062 8422-8541/com.example.app W/System.err:     at com.netcosports.ntlm.NTLMEngineImpl$Type2Message.<init>(NTLMEngineImpl.java:1152)
2019-06-14 16:24:44.062 8422-8541/com.example.app W/System.err:     at com.netcosports.ntlm.NTLMEngineImpl.generateType3Msg(NTLMEngineImpl.java:1737)
2019-06-14 16:24:44.062 8422-8541/com.example.app W/System.err:     at com.netcosports.ntlm.NTLMAuthenticator.authenticate(NTLMAuthenticator.java:41)
2019-06-14 16:24:44.062 8422-8541/com.example.app W/System.err:     at okhttp3.internal.http.RetryAndFollowUpInterceptor.followUpRequest(RetryAndFollowUpInterceptor.java:288)
2019-06-14 16:24:44.062 8422-8541/com.example.app W/System.err:     at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:158)
2019-06-14 16:24:44.062 8422-8541/com.example.app W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
2019-06-14 16:24:44.063 8422-8541/com.example.app W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
2019-06-14 16:24:44.063 8422-8541/com.example.app W/System.err:     at com.example.app.dependency_injection.modules.NetworkModule.lambda$ewsInterceptor$2(NetworkModule.java:109)
2019-06-14 16:24:44.063 8422-8541/com.example.app W/System.err:     at com.example.app.dependency_injection.modules.-$$Lambda$NetworkModule$gJlLI1xFFHXNMXA26fwDcJD60fQ.intercept(Unknown Source:0)
2019-06-14 16:24:44.063 8422-8541/com.example.app W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
2019-06-14 16:24:44.063 8422-8541/com.example.app W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
2019-06-14 16:24:44.063 8422-8541/com.example.app W/System.err:     at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
2019-06-14 16:24:44.063 8422-8541/com.example.app W/System.err:     at okhttp3.RealCall$AsyncCall.execute(RealCall.java:147)
2019-06-14 16:24:44.063 8422-8541/com.example.app W/System.err:     at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
2019-06-14 16:24:44.063 8422-8541/com.example.app W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2019-06-14 16:24:44.063 8422-8541/com.example.app W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2019-06-14 16:24:44.063 8422-8541/com.example.app W/System.err:     at java.lang.Thread.run(Thread.java:764)

I simply use the library like:

return new OkHttpClient.Builder()
.connectTimeout(30, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.authenticator(new NTLMAuthenticator(Settings.getCalendarEmail(), Settings.getCalendarPassword(), null))
.followSslRedirects(true)
.followRedirects(true)
.protocols(Arrays.asList(Protocol.HTTP_1_1))
.addInterceptor(interceptor)
.build();

It works will on one exchange account just fine.

But when specifying autodiscovery url for our other office 365 account to be https://outlook.office365.com/autodiscover/autodiscover.svc Im stuck at login.

Problem with passing domain name

When I don’t transfer the domain
like this

OkHttpClient client = new OkHttpClient.Builder ()
                 .authenticator (new NTLMAuthenticator (userName, password, null))
                 .build ();

Works fine

But When I pass domain

String userDomain = “ourdomain”;
OkHttpClient client = new OkHttpClient.Builder ()
                 .authenticator (new NTLMAuthenticator (userName, password, userDomain))
                 .build ();

I get an error
Too many follow-up requests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.