| Line 58... |
Line 58... |
| 58 |
PostInterceptor postInterceptor;
|
58 |
PostInterceptor postInterceptor;
|
| 59 |
|
59 |
|
| 60 |
@Autowired
|
60 |
@Autowired
|
| 61 |
AuthenticationInterceptor authenticationInterceptor;
|
61 |
AuthenticationInterceptor authenticationInterceptor;
|
| 62 |
|
62 |
|
| - |
|
63 |
@Autowired
|
| - |
|
64 |
com.spice.profitmandi.web.interceptor.ApiKeyInterceptor apiKeyInterceptor;
|
| - |
|
65 |
|
| 63 |
@Bean
|
66 |
@Bean
|
| 64 |
public Docket api() {
|
67 |
public Docket api() {
|
| 65 |
return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any())
|
68 |
return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any())
|
| 66 |
.paths(PathSelectors.any()).build().apiInfo(apiInfo());
|
69 |
.paths(PathSelectors.any()).build().apiInfo(apiInfo());
|
| 67 |
}
|
70 |
}
|
| Line 80... |
Line 83... |
| 80 |
ProfitMandiConstants.URL_CCAVENUE_PAY_RESPONSE, ProfitMandiConstants.URL_CCAVENUE_PAY_CANCELLED,
|
83 |
ProfitMandiConstants.URL_CCAVENUE_PAY_RESPONSE, ProfitMandiConstants.URL_CCAVENUE_PAY_CANCELLED,
|
| 81 |
ProfitMandiConstants.URL_PINELABS_PAY_RESPONSE, ProfitMandiConstants.URL_LOAN_CCAVENUE_PAY_CANCELLED,
|
84 |
ProfitMandiConstants.URL_PINELABS_PAY_RESPONSE, ProfitMandiConstants.URL_LOAN_CCAVENUE_PAY_CANCELLED,
|
| 82 |
ProfitMandiConstants.URL_LOAN_CCAVENUE_PAY_RESPONSE,
|
85 |
ProfitMandiConstants.URL_LOAN_CCAVENUE_PAY_RESPONSE,
|
| 83 |
ProfitMandiConstants.URL_POST_OFFICE,
|
86 |
ProfitMandiConstants.URL_POST_OFFICE,
|
| 84 |
ProfitMandiConstants.HOOK_URL_CALLER_ID,
|
87 |
ProfitMandiConstants.HOOK_URL_CALLER_ID,
|
| 85 |
ProfitMandiConstants.URL_NEW_LEAD);
|
88 |
ProfitMandiConstants.URL_NEW_LEAD,
|
| - |
|
89 |
"/external/**");
|
| 86 |
|
90 |
|
| 87 |
registry.addInterceptor(simpleCORSInterceptor).addPathPatterns("/**").excludePathPatterns("/swagger-ui.html","/clickToCall/**",
|
91 |
registry.addInterceptor(simpleCORSInterceptor).addPathPatterns("/**").excludePathPatterns("/swagger-ui.html","/clickToCall/**",
|
| 88 |
ProfitMandiConstants.URL_PAYU_PAY_RESPONSE, ProfitMandiConstants.URL_PAYU_PAY_CANCELLED,
|
92 |
ProfitMandiConstants.URL_PAYU_PAY_RESPONSE, ProfitMandiConstants.URL_PAYU_PAY_CANCELLED,
|
| 89 |
ProfitMandiConstants.URL_CCAVENUE_PAY_RESPONSE, ProfitMandiConstants.URL_CCAVENUE_PAY_CANCELLED,
|
93 |
ProfitMandiConstants.URL_CCAVENUE_PAY_RESPONSE, ProfitMandiConstants.URL_CCAVENUE_PAY_CANCELLED,
|
| 90 |
ProfitMandiConstants.URL_PINELABS_PAY_RESPONSE, ProfitMandiConstants.URL_LOAN_CCAVENUE_PAY_CANCELLED,
|
94 |
ProfitMandiConstants.URL_PINELABS_PAY_RESPONSE, ProfitMandiConstants.URL_LOAN_CCAVENUE_PAY_CANCELLED,
|
| 91 |
ProfitMandiConstants.URL_LOAN_CCAVENUE_PAY_RESPONSE,
|
95 |
ProfitMandiConstants.URL_LOAN_CCAVENUE_PAY_RESPONSE,
|
| 92 |
ProfitMandiConstants.URL_POST_OFFICE,
|
96 |
ProfitMandiConstants.URL_POST_OFFICE,
|
| 93 |
ProfitMandiConstants.HOOK_URL_CALLER_ID,
|
97 |
ProfitMandiConstants.HOOK_URL_CALLER_ID,
|
| 94 |
ProfitMandiConstants.URL_NEW_LEAD,
|
98 |
ProfitMandiConstants.URL_NEW_LEAD,
|
| 95 |
ProfitMandiConstants.URL_SHOPIFY, "/user/token/unregistered");
|
99 |
ProfitMandiConstants.URL_SHOPIFY, "/user/token/unregistered",
|
| - |
|
100 |
"/external/**");
|
| 96 |
|
101 |
|
| 97 |
registry.addInterceptor(authenticationInterceptor).addPathPatterns("/**")
|
102 |
registry.addInterceptor(authenticationInterceptor).addPathPatterns("/**")
|
| 98 |
.excludePathPatterns("/user/token/unregistered")
|
103 |
.excludePathPatterns("/user/token/unregistered")
|
| 99 |
.excludePathPatterns(ProfitMandiConstants.URL_ADMIN_TOKEN).excludePathPatterns("/**/swagger*/**")
|
104 |
.excludePathPatterns(ProfitMandiConstants.URL_ADMIN_TOKEN).excludePathPatterns("/**/swagger*/**")
|
| 100 |
.excludePathPatterns("/document")
|
105 |
.excludePathPatterns("/document")
|
| Line 104... |
Line 109... |
| 104 |
.excludePathPatterns(ProfitMandiConstants.URL_USER_GOOGLE_LOGIN,
|
109 |
.excludePathPatterns(ProfitMandiConstants.URL_USER_GOOGLE_LOGIN,
|
| 105 |
ProfitMandiConstants.URL_USER_GOOGLE_LOGIN + "/", ProfitMandiConstants.URL_VERIFY_OTP)
|
110 |
ProfitMandiConstants.URL_USER_GOOGLE_LOGIN + "/", ProfitMandiConstants.URL_VERIFY_OTP)
|
| 106 |
.excludePathPatterns("/store/token").excludePathPatterns("/gc/**").excludePathPatterns("/stores/**")
|
111 |
.excludePathPatterns("/store/token").excludePathPatterns("/gc/**").excludePathPatterns("/stores/**")
|
| 107 |
.excludePathPatterns(ProfitMandiConstants.URL_AI_LEAD_INTAKE)
|
112 |
.excludePathPatterns(ProfitMandiConstants.URL_AI_LEAD_INTAKE)
|
| 108 |
.excludePathPatterns("/v2/api-docs/**")
|
113 |
.excludePathPatterns("/v2/api-docs/**")
|
| 109 |
.excludePathPatterns("/cpass-test/**", "/cpass/wa-listen");
|
114 |
.excludePathPatterns("/cpass-test/**", "/cpass/wa-listen")
|
| - |
|
115 |
.excludePathPatterns("/external/**");
|
| - |
|
116 |
|
| - |
|
117 |
// third-party partner APIs: X-Api-Key auth only (docs page is open)
|
| - |
|
118 |
registry.addInterceptor(apiKeyInterceptor).addPathPatterns("/external/**")
|
| - |
|
119 |
.excludePathPatterns("/external/v1/docs");
|
| 110 |
|
120 |
|
| 111 |
// registry to check api access on basis of UserInfo
|
121 |
// registry to check api access on basis of UserInfo
|
| 112 |
}
|
122 |
}
|
| 113 |
|
123 |
|
| 114 |
@Override
|
124 |
@Override
|