Skip to content

Commit 0ac7ab1

Browse files
authored
Merge pull request #16 from aistoica/Authentication
[Authentication] Enable security when running tests.
2 parents 981d102 + 888c300 commit 0ac7ab1

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

src/main/java/org/springframework/samples/petclinic/util/ApplicationSwaggerConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public Docket customDocket(){
5454
private ApiInfo getApiInfo() {
5555
return new ApiInfo(
5656
"REST Petclinic backend Api Documentation",
57-
"This is REST API documentation of the Spring Petclinic backend",
57+
"This is REST API documentation of the Spring Petclinic backend. If authentication is enabled, when calling the APIs use admin/admin",
5858
"1.0",
5959
"Petclinic backend terms of service",
6060
new Contact(
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# active profiles config
2+
#
3+
# application use two active profiles
4+
#
5+
# one for select repository layer
6+
# ------------------------------------------------
7+
# When using HSQL, use: hsqldb
8+
# When using MySQL, use: mysql
9+
# When using PostgeSQL, use: postgresql
10+
# ------------------------------------------------
11+
#
12+
# one - for select database
13+
# ------------------------------------------------
14+
# When using Spring jpa, use: jpa
15+
# When using Spring JDBC, use: jdbc
16+
# When using Spring Data JPA, use: spring-data-jpa
17+
# ------------------------------------------------
18+
19+
spring.profiles.active=hsqldb,spring-data-jpa
20+
21+
# ------------------------------------------------
22+
23+
server.port=9966
24+
server.context-path=/petclinic/
25+
26+
spring.messages.basename=messages/messages
27+
28+
logging.level.org.springframework=INFO
29+
#logging.level.org.springframework=DEBUG
30+
31+
#logging.level.org.hibernate.SQL=DEBUG
32+
#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
33+
34+
# enable the desired authentication type
35+
# by default the authentication is disabled
36+
security.ignored=/**
37+
basic.authentication.enabled=true

0 commit comments

Comments
 (0)