java-micronaut.common.configuration.application.yml.mustache Maven / Gradle / Ivy
{{!CLIENT CONFIGURATION}}
{{#client}}
{{{applicationName}}}-base-path: "{{{basePath}}}"
micronaut:
application:
name: {{{applicationName}}}{{!
configure authorization from the parameters
}}{{#configureAuth}}
security:
oauth2:
clients:{{#oauthMethods}}
{{#lambda.replaceDotsWithUnderscore}}{{{name}}}{{/lambda.replaceDotsWithUnderscore}}:
grant-type: {{#isCode}}authorization_code{{/isCode}}{{#isImplicit}}implicit{{/isImplicit}}{{#isPassword}}password{{/isPassword}}{{#isApplication}}client_credentials{{/isApplication}}
scopes: [{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}]{{!authorization url}}{{#authorizationUrl}}
authorization:
url: "{{{authorizationUrl}}}"{{/authorizationUrl}}{{!token url}}{{#tokenUrl}}
token:
auth-method: client_secret_basic
url: "{{{tokenUrl}}}"{{/tokenUrl}}{{!refreshUrl is not used}}
# TODO Fill in the parameters for {{{name}}} authorization if needed
# client-id:
# client-secret:{{/oauthMethods}}{{/configureAuth}}{{!
do not configure authorization, but leave hints for user
}}{{^configureAuth}}
# TODO configure security features
security:
oauth2:
clients:
# An example of how oauth client is filled
# name:
# grant-type: authorization_code | client_credentials
# scopes: []
# token:
# auth-method: client_secret_basic
# url: "https://"
# client-id:
# client-secret:
# An example of how to apply other authorization methods
# authentication: bearer | cookie | session{{/configureAuth}}
{{#configureAuth}}security:
{{!api key authorization}}api-key-auth:{{#authMethods}}{{#isApiKey}}
{{{name}}}:
location: {{#isKeyInQuery}}query{{/isKeyInQuery}}{{#isKeyInHeader}}header{{/isKeyInHeader}}{{#isKeyInCookie}}cookie{{/isKeyInCookie}}
param-name: "{{{keyParamName}}}"
# TODO fill in api key for {{{name}}} authorization
api-key:
{{/isApiKey}}{{/authMethods}}
{{!basic authorization}}basic-auth:{{#authMethods}}{{#isBasicBasic}}
{{{name}}}:
# TODO fill in credentials for {{{name}}} authorization
username:
password:
{{/isBasicBasic}}{{/authMethods}}{{/configureAuth}}
{{/client}}
{{!SERVER CONFIGURATION}}
{{#server}}
micronaut:
application:
name: {{{applicationName}}}
server:
port: 8080
context-path: "{{{contextPath}}}/"
security:
# authentication: bearer | cookie | session | idtoken
{{/server}}
jackson:
serialization:
writeEnumsUsingToString: true
writeDatesAsTimestamps: false
deserialization:
readEnumsUsingToString: true
failOnUnknownProperties: false
failOnInvalidSubtype: false
© 2015 - 2024 Weber Informatics LLC | Privacy Policy