Package org.apache.stratos.rest.endpoint.oauth2

Examples of org.apache.stratos.rest.endpoint.oauth2.ValidationServiceClient.validateAuthenticationRequest()


            HttpHeaders httpHeaders = new HttpHeadersImpl(message);
            String header = httpHeaders.getRequestHeaders().getFirst("Authorization");
            // if the authorization token has Bearer..
            if (header.startsWith("Bearer ")) {
                String accessToken = header.substring(7).trim();
                respDTO = validationServiceClient.validateAuthenticationRequest(accessToken); //TODO : send scope params
                boolean valid = respDTO.getValid();
                if (!valid) {
                    // authorization failure..
                    return Response.status(Response.Status.FORBIDDEN).build();
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.