# ===================================================================
# Spring Boot configuration for the "dev" profile.
#
# This configuration overrides the application.yml file.
#
# More information on profiles: https://www.jhipster.tech/profiles/
# More information on configuration properties: https://www.jhipster.tech/common-application-properties/
# ===================================================================

# ===================================================================
# Standard Spring Boot properties.
# Full reference is available at:
# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
# ===================================================================

logging:
  level:
    ROOT: DEBUG
    tech.jhipster: DEBUG
    org.hibernate.SQL: DEBUG
    at.ac.uibk.gitsearch: DEBUG
    org.glassfish.jersey.client.ClientExecutorProvidersConfigurator: INFO
    javax.management.mbeanserver: INFO

management:
  health:
    elasticsearch:
      enabled: false

spring:
  #  profiles:
  #    active: dev
  #    include:
  #      - doc-api
  # Uncomment to activate TLS for the dev profile
  #- tls
  main:
    allow-bean-definition-overriding: true
  devtools:
    restart:
      enabled: true
      additional-exclude: static/**,.h2.server.properties
    livereload:
      enabled: false # we use Webpack dev server + BrowserSync for livereload
  jackson:
    serialization:
      indent-output: true
  datasource:
    type: com.zaxxer.hikari.HikariDataSource
    url: jdbc:h2:file:./target/h2db/db/gitsearch;DB_CLOSE_DELAY=-1
    username: gitsearch
    password:
    hikari:
      poolName: Hikari
      auto-commit: false
  h2:
    console:
      # disable spring boot built-in h2-console since we start it manually with correct configuration
      enabled: true
  jpa:
    database-platform: tech.jhipster.domain.util.FixedH2Dialect
  elasticsearch:
    uris: http://localhost:9200
  liquibase:
    # Remove 'faker' if you do not want the sample data to be loaded automatically
    contexts: dev, faker
  mail:
    host: localhost
    port: 25
    username:
    password:
  messages:
    cache-duration: PT1S # 1 second, see the ISO 8601 standard
  thymeleaf:
    cache: false
  security:
    oauth2:
      client:
        provider:
          oidc:
            issuer-uri: https://keycloak.codeability-austria.uibk.ac.at/auth/realms/gitsearch
          # localhost will be bound to the guest (container), not the host
          # to run KeyCloak as a daemon, i.e., npm run docker:keycloak:up, /etc/hosts must be edited
          # and the issuer-uri should be as follows:
          # issuer-uri: http://keycloak:9080/auth/realms/jhipster
          # gitlabOidc:
          #   issuer-uri: https://sharing.codeability-austria.uibk.ac.at
        registration:
          oidc:
            client-id: myclient
            client-secret: 7987e4e6e6d0c5ddb175a043d82c5675b69a2db177c7e815c13ae41515643498
            scope: openid,profile,email
          # gitlabOidc:
          #   client-id: 149276ac11138d9ba72fb3cd12815e3fa2f372866df0eac0f7d1aae5fdffea24
          #   client-secret: 6f480635241f420a361581f4837594ea6f48f5ee6f515c1aa89f325dd922dbb0
          #   scope: api,read_user,read_api,read_repository,write_repository,read_registry,write_registry,sudo,openid,profile,email
server:
  port: 8080

# ===================================================================
# JHipster specific properties
#
# Full reference is available at: https://www.jhipster.tech/common-application-properties/
# ===================================================================

jhipster:
  cache: # Cache configuration
    ehcache: # Ehcache configuration
      time-to-live-seconds: 3600 # By default objects stay 1 hour in the cache
      max-entries: 100 # Number of objects in each cache entry
  # CORS is only enabled by default with the "dev" profile
  cors:
    # Allow Ionic for JHipster by default (* no longer allowed in Spring Boot 2.4+)
    allowed-origins: 'http://localhost:8100,https://localhost:8100,http://localhost:9000,https://localhost:9000,http://localhost:4200,https://localhost:4200'
    allowed-methods: '*'
    allowed-headers: '*'
    exposed-headers: 'Authorization,Link,X-Total-Count,X-${jhipster.clientApp.name}-alert,X-${jhipster.clientApp.name}-error,X-${jhipster.clientApp.name}-params'
    allow-credentials: true
    max-age: 1800
  security:
    oauth2:
      audience:
    # TODO: audience seems not really relevant, could be omitted? It is identical with client-id above
    #        - 149276ac11138d9ba72fb3cd12815e3fa2f372866df0eac0f7d1aae5fdffea24
    authentication:
      jwt:
        # This token must be encoded using Base64 and be at least 256 bits long (you can type `openssl rand -base64 64` on your command line to generate a 512 bits one)
        base64-secret: ZTY3OGIwZWZhMzdhYTQ2NjAwNTdlNDQ2NWM4YjQyMzlhMWVkMTJlYTExYzMwMzBjOWIzM2E1OTRmZWZkZmYzYzZhNWQ5N2EzZjMyNTFkMjM0ZjNmOWRhYTYzNGEzZDE3NThkYTNmZGVmNTQ1MmRlZjg1YWY4NTU4OGVmNDBkZDI=
        # Token is valid 24 hours
        token-validity-in-seconds: 86400
        token-validity-in-seconds-for-remember-me: 2592000
  mail: # specific JHipster mail property, for standard properties see MailProperties
    base-url: http://127.0.0.1:8080
  logging:
    use-json-format: false # By default, logs are not in Json format
    logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration
      enabled: false
      host: localhost
      port: 5000
      queue-size: 512
  audit-events:
    retention-period: 30 # Number of days before audit events are deleted.

# ===================================================================
# Application specific properties
# Add your own application properties here, see the ApplicationProperties class
# to have type-safe configuration, like in the JHipsterProperties above
#
# More documentation is available at:
# https://www.jhipster.tech/common-application-properties/
# ===================================================================

application:
  registeredConnectors:
    - url: 'http://localhost:8081/api/sharing/config'
      accessToken: acdd-erdf-asd2-234f-234d-32eb
    - url: 'http://localhost:8082/api/sharingPluginConfig'
      accessToken: 2c8845a4-b3df-414b-a682-36e2313dc1c0
  registeredConnectorsCallBackURL: http://localhost:8080/api
  installationName: Sharing Plattform (Development)
  gitlab:
    url: https://sharing.codeability-austria.uibk.ac.at
    guestAccessToken: zPxPmJE3UXAZJpBzxqej
    adminAccessToken: PJopKiYsK9AxqajfBxR6
  oerLink: https://oeresource-dev.logic.at
