By: SENTHILKUMAR DHANAPAL user 24 Jul 2018 at 8:56 a.m. CDT

1 Response
SENTHILKUMAR DHANAPAL gravatar
Hi, I am using glu verison 3.1.2. I am trying to get the access token to validate the current password of the user. I using the below endpoint to do the same. when I call via postman I get 200 response with access code valid for 299 sec's but the same call thru my springboot applicaton return 401. Request Detail : via postman POST // oxauth/restv1/token username=senthild4u%40hotmail.com&password=Change%231&client_id=%40!F3F0.D134.84D5.6546!0001!743F.5C7C!0008!7216.F683.3283.11F0&client_secret=changeit&grant_type=password&Content-Type=application%2Fx-www-form-urlencoded via application POST // oxauth/restv1/token username=senthild4u%40hotmail.com&password=Change%231&client_id=%40%21F3F0.D134.84D5.6546%210001%21743F.5C7C%210008%217216.F683.3283.11F0&client_secret=changeit&grant_type=password&Content-Type=application%2Fx-www-form-urlencoded the only difference I noticed is cient_id goes as converted string (! as %21) . is this a root cause ? logs : C!0001!4A8E.A672!0008!17DF.EF8C' 2018-07-24 01:08:22,634 INFO [qtp1020391880-17] [org.xdi.oxauth.auth.AuthenticationFilter] (AuthenticationFilter.java:252) - Basic authentication failed java.lang.Exception: The Token Authentication Method is not valid. at org.xdi.oxauth.auth.AuthenticationFilter.processBasicAuth(AuthenticationFilter.java:229) [classes/:?] at org.xdi.oxauth.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:112) [classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.gluu.oxserver.filters.AbstractCorsFilter.handleNonCORS(AbstractCorsFilter.java:343) [oxcore-server-3.1.2.Final.jar:?] at org.gluu.oxserver.filters.AbstractCorsFilter.doFilter(AbstractCorsFilter.java:120) [oxcore-server-3.1.2.Final.jar:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.xdi.oxauth.audit.debug.ServletLoggingFilter.doFilter(ServletLoggingFilter.java:55) [classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [jetty-security-9.3.15.v20161220.jar:9.3.15.v20161220]

By SENTHILKUMAR DHANAPAL user 24 Jul 2018 at 11:04 a.m. CDT

SENTHILKUMAR DHANAPAL gravatar
please ignore. below change worked for me. String clientId = URLDecoder.decode("clientId", "UTF-8"); you can close this.