Skip to content

Commit

Permalink
Allow keycloak.v2 theme to be used (#273)
Browse files Browse the repository at this point in the history
Fixes #272
  • Loading branch information
treydock authored Jan 4, 2023
1 parent 36707f6 commit b2c5e9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/puppet/provider/keycloak_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def name_uuid(*args)

def check_theme_exists(theme, res)
return true if theme == 'keycloak'
return true if theme == 'keycloak.v2'

install_dir = self.class.install_dir || '/opt/keycloak'
path = File.join(install_dir, 'themes', theme)
Expand Down
8 changes: 8 additions & 0 deletions spec/acceptance/2_realm_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ class { 'keycloak': }
smtp_server_reply_to_display_name => 'Hostmaster',
brute_force_protected => true,
roles => ['uma_authorization', 'new_role', 'other_new_role'],
login_theme => 'keycloak.v2',
account_theme => 'keycloak.v2',
admin_theme => 'keycloak.v2',
email_theme => 'keycloak.v2',
custom_properties => {
'failureFactor' => 60,
'revokeRefreshToken' => true,
Expand Down Expand Up @@ -237,6 +241,10 @@ class { 'keycloak': }
expect(data['smtpServer']['replyTo']).to eq('[email protected]')
expect(data['smtpServer']['replyToDisplayName']).to eq('Hostmaster')
expect(data['bruteForceProtected']).to eq(true)
expect(data['loginTheme']).to eq('keycloak.v2')
expect(data['accountTheme']).to eq('keycloak.v2')
expect(data['adminTheme']).to eq('keycloak.v2')
expect(data['emailTheme']).to eq('keycloak.v2')
expect(data['failureFactor']).to eq(60)
expect(data['revokeRefreshToken']).to eq(true)
end
Expand Down

0 comments on commit b2c5e9b

Please sign in to comment.