Skip to content

Commit

Permalink
use new nexus lib
Browse files Browse the repository at this point in the history
Signed-off-by: Rémi Verchère <[email protected]>
  • Loading branch information
rverchere-acn committed Apr 4, 2023
1 parent 5b0d82d commit 6a92d4e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
8 changes: 6 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.github.flytreeleft</groupId>
<artifactId>nexus3-keycloak-plugin</artifactId>
<version>0.6.0-SNAPSHOT</version>
<version>0.7.0-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<packaging>bundle</packaging>

Expand All @@ -27,7 +27,7 @@
<parent>
<groupId>org.sonatype.nexus.plugins</groupId>
<artifactId>nexus-plugins</artifactId>
<version>3.15.3-01</version>
<version>3.50.0-01</version>
</parent>

<properties>
Expand Down Expand Up @@ -83,6 +83,10 @@
<name>TarasRozputnii</name>
<url>https://github.com/TarasRozputnii</url>
</contributor>
<contributor>
<name>rverchere</name>
<url>https://github.com/rverchere</url>
</contributor>
</contributors>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
package org.github.flytreeleft.nexus3.keycloak.plugin.internal;

import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.enterprise.inject.Typed;
import javax.inject.Named;
Expand Down Expand Up @@ -55,6 +57,16 @@ public Privilege getPrivilege(String privilegeId) throws NoSuchPrivilegeExceptio
}

@Override
public Privilege getPrivilegeByName(String privilegeName) throws NoSuchPrivilegeException {
throw new NoSuchPrivilegeException("Keycloak plugin doesn't support privileges");
}

@Override
public List<Privilege> getPrivileges(final Set<String> privilegeIds) {
return Collections.emptyList();
}

@Override
public Role getRole(String roleId) throws NoSuchRoleException {
Role role = this.client.findRoleByRoleId(roleId);
if (role == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,8 @@ public User getUser(String userId) throws UserNotFoundException {
}

@Override
public User getUser(String userId, String source) throws UserNotFoundException {
log.trace("Finding user: {} in source: {}", userId, source);
return getUser(userId);
}

@Override
public User getUser(String userId, String source, Set<String> roleIds) throws UserNotFoundException {
log.trace("Finding user: {} in source: {}", userId, source);
public User getUser(String userId, Set<String> roleIds) throws UserNotFoundException {
log.trace("Finding user: {} in source: {}", userId, roleIds);
return getUser(userId);
}

Expand Down

0 comments on commit 6a92d4e

Please sign in to comment.