How To Disable OAuth2 Security in OpenLegacy API Projects
Step By Step Guide
Go To
pom.xml
file and delete/comment the following security dependencies:<dependency> <groupId>org.openlegacy</groupId> <artifactId>openlegacy-security-client-jdbc</artifactId> <version>${openlegacy.version}</version> </dependency> <dependency> <groupId>org.openlegacy</groupId> <artifactId>openlegacy-security-user-jdbc</artifactId> <version>${openlegacy.version}</version> </dependency> <!--Since version 4.6.0 --> <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-security</artifactId> </dependency>
2. This step is not mandatory, go to application.yml
and delete/comment the following security properties:
security:
db:
init-schema: true
clients:
- client-id: client_id
client-secret: '{noop}client_secret'
scope: read,write,trust,ol_admin
authorized-grant-types: client_credentials
spring:
security:
oauth2:
resourceserver:
jwt:
jwk-set-uri: http://localhost:8080/.well-known/jwks.json
3. Navigate to swagger and run the API without authorization.
4. If you followed the steps correctly you should get the response and successfully disabled security from OpenLegacy API project.
, multiple selections available,