Skip to content

Commit

Permalink
Merge pull request #16 from aistoica/Authentication
Browse files Browse the repository at this point in the history
[Authentication] Enable security when running tests.
  • Loading branch information
vfedoriv authored Jun 22, 2018
2 parents 981d102 + 888c300 commit 0ac7ab1
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public Docket customDocket(){
private ApiInfo getApiInfo() {
return new ApiInfo(
"REST Petclinic backend Api Documentation",
"This is REST API documentation of the Spring Petclinic backend",
"This is REST API documentation of the Spring Petclinic backend. If authentication is enabled, when calling the APIs use admin/admin",
"1.0",
"Petclinic backend terms of service",
new Contact(
Expand Down
37 changes: 37 additions & 0 deletions src/test/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# active profiles config
#
# application use two active profiles
#
# one for select repository layer
# ------------------------------------------------
# When using HSQL, use: hsqldb
# When using MySQL, use: mysql
# When using PostgeSQL, use: postgresql
# ------------------------------------------------
#
# one - for select database
# ------------------------------------------------
# When using Spring jpa, use: jpa
# When using Spring JDBC, use: jdbc
# When using Spring Data JPA, use: spring-data-jpa
# ------------------------------------------------

spring.profiles.active=hsqldb,spring-data-jpa

# ------------------------------------------------

server.port=9966
server.context-path=/petclinic/

spring.messages.basename=messages/messages

logging.level.org.springframework=INFO
#logging.level.org.springframework=DEBUG

#logging.level.org.hibernate.SQL=DEBUG
#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE

# enable the desired authentication type
# by default the authentication is disabled
security.ignored=/**
basic.authentication.enabled=true

0 comments on commit 0ac7ab1

Please sign in to comment.