This is an automated email from the ASF dual-hosted git repository.

olamy pushed a commit to branch redback-2.6.x
in repository https://gitbox.apache.org/repos/asf/archiva-redback-core.git


The following commit(s) were added to refs/heads/redback-2.6.x by this push:
     new 83f5e6d6 remove unused method
83f5e6d6 is described below

commit 83f5e6d6bdc1b7fa83c84188b202c85af91c40fc
Author: Olivier Lamy <[email protected]>
AuthorDate: Mon Jun 12 09:18:10 2023 +1000

    remove unused method
    
    Signed-off-by: Olivier Lamy <[email protected]>
---
 .../redback/rest/api/services/LoginService.java    | 10 -------
 .../redback/rest/services/DefaultLoginService.java | 35 ----------------------
 2 files changed, 45 deletions(-)

diff --git 
a/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/LoginService.java
 
b/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/LoginService.java
index f0e4f075..02202433 100644
--- 
a/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/LoginService.java
+++ 
b/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/LoginService.java
@@ -34,16 +34,6 @@ import javax.ws.rs.core.MediaType;
 public interface LoginService
 {
 
-    @Path( "addAuthenticationKey" )
-    @GET
-    @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, 
MediaType.TEXT_PLAIN } )
-    @RedbackAuthorization( noRestriction = true )
-    String addAuthenticationKey( @QueryParam( "providerKey" ) String 
providedKey,
-                                 @QueryParam( "principal" ) String principal, 
@QueryParam( "purpose" ) String purpose,
-                                 @QueryParam( "expirationMinutes" ) int 
expirationMinutes )
-        throws RedbackServiceException;
-
-
     @Path( "ping" )
     @GET
     @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, 
MediaType.TEXT_PLAIN } )
diff --git 
a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java
 
b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java
index 33160b45..6553f92a 100644
--- 
a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java
+++ 
b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java
@@ -88,41 +88,6 @@ public class DefaultLoginService
         this.httpAuthenticator = httpAuthenticator;
     }
 
-
-    public String addAuthenticationKey( String providedKey, String principal, 
String purpose, int expirationMinutes )
-        throws RedbackServiceException
-    {
-        KeyManager keyManager = securitySystem.getKeyManager();
-        AuthenticationKey key;
-
-        if ( keyManager instanceof MemoryKeyManager )
-        {
-            key = new MemoryAuthenticationKey();
-        }
-        else
-        {
-            key = new JdoAuthenticationKey();
-        }
-
-        key.setKey( providedKey );
-        key.setForPrincipal( principal );
-        key.setPurpose( purpose );
-
-        Calendar now = getNowGMT();
-        key.setDateCreated( now.getTime() );
-
-        if ( expirationMinutes >= 0 )
-        {
-            Calendar expiration = getNowGMT();
-            expiration.add( Calendar.MINUTE, expirationMinutes );
-            key.setDateExpires( expiration.getTime() );
-        }
-
-        keyManager.addKey( key );
-
-        return key.getKey();
-    }
-
     public Boolean ping()
         throws RedbackServiceException
     {

Reply via email to