mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-11 09:38:28 +08:00
PL-6730 REST API URLs changed
This commit is contained in:
parent
556ab63708
commit
aa5b3d37be
@ -44,6 +44,8 @@
|
||||
|
||||
<module name="rest-api" dependsOn="client" blocks="web,portal">
|
||||
<artifact name="cuba-rest-api" appJar="true"/>
|
||||
|
||||
<property name="cuba.dispatcherSpringContextConfig" value="rest-api-security-spring.xml"/>
|
||||
</module>
|
||||
|
||||
<module name="gui" dependsOn="client" blocks="web,desktop">
|
||||
|
@ -47,7 +47,7 @@ import java.util.UUID;
|
||||
* Controller that performs CRUD entity operations
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "/entities", produces = "application/json; charset=UTF-8")
|
||||
@RequestMapping(value = "/api/entities", produces = "application/json; charset=UTF-8")
|
||||
public class EntitiesController {
|
||||
|
||||
@Inject
|
||||
|
@ -40,7 +40,7 @@ public class OAuthTokenController {
|
||||
@Inject
|
||||
private OAuthTokenRevoker oAuthTokenRevoker;
|
||||
|
||||
@RequestMapping(value = "/oauth/revoke", method = RequestMethod.POST)
|
||||
@RequestMapping(value = "/api/oauth/revoke", method = RequestMethod.POST)
|
||||
public ResponseEntity<Void> revokeToken(@RequestParam("token") final String token,
|
||||
@RequestParam(value = "token_hint", required = false) final String tokenHint, final Principal principal) {
|
||||
log.info("POST {}, /oauth/revoke; token = {}, tokenHint = {}", token, tokenHint);
|
||||
|
@ -42,7 +42,7 @@ import java.util.*;
|
||||
* Controller that is used for operations with predefined JPQL queries
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/queries")
|
||||
@RequestMapping("/api/queries")
|
||||
public class QueriesController {
|
||||
|
||||
@Inject
|
||||
|
@ -34,7 +34,7 @@
|
||||
<context:component-scan base-package="com.haulmont.restapi"/>
|
||||
|
||||
<!-- According to the spec the token endpoint should be secured by the basic authentication -->
|
||||
<http pattern="/dispatch/oauth/**"
|
||||
<http pattern="/dispatch/api/oauth/**"
|
||||
create-session="stateless"
|
||||
authentication-manager-ref="clientAuthenticationManager"
|
||||
xmlns="http://www.springframework.org/schema/security">
|
||||
@ -64,6 +64,7 @@
|
||||
|
||||
<!-- Specifies token endpoint.-->
|
||||
<oauth2:authorization-server
|
||||
token-endpoint-url="/api/oauth/token"
|
||||
client-details-service-ref="clientDetailsService"
|
||||
token-services-ref="tokenServices" >
|
||||
<oauth2:password authentication-manager-ref="userAuthenticationManager"/>
|
||||
@ -85,7 +86,7 @@
|
||||
|
||||
<oauth2:resource-server id="resourceFilter" token-services-ref="tokenServices" />
|
||||
|
||||
<http pattern="/dispatch/entities/**"
|
||||
<http pattern="/dispatch/api/entities/**"
|
||||
create-session="stateless"
|
||||
entry-point-ref="oauthAuthenticationEntryPoint"
|
||||
xmlns="http://www.springframework.org/schema/security">
|
||||
@ -96,7 +97,7 @@
|
||||
<custom-filter ref="resourceFilter" before="PRE_AUTH_FILTER"/>
|
||||
</http>
|
||||
|
||||
<http pattern="/dispatch/queries/**"
|
||||
<http pattern="/dispatch/api/queries/**"
|
||||
create-session="stateless"
|
||||
entry-point-ref="oauthAuthenticationEntryPoint"
|
||||
xmlns="http://www.springframework.org/schema/security">
|
||||
|
Loading…
Reference in New Issue
Block a user