ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [32/50] [abbrv] incubator-ignite git commit: #ignite-189: remove AuthenticationContext interface.
Date Fri, 13 Feb 2015 16:25:59 GMT
#ignite-189: remove AuthenticationContext interface.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d92bc169
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d92bc169
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d92bc169

Branch: refs/heads/sprint-1
Commit: d92bc169bca37aaa45e31c16a22afb42b6d15199
Parents: 49a7586
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Feb 13 12:16:00 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Feb 13 12:16:00 2015 +0300

----------------------------------------------------------------------
 .../processors/rest/GridRestProcessor.java      |   2 +-
 .../plugin/security/AuthenticationContext.java  |  66 ++++++++++-
 .../security/AuthenticationContextAdapter.java  | 110 -------------------
 3 files changed, 62 insertions(+), 116 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d92bc169/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
index ddf6905..fe7a760 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
@@ -473,7 +473,7 @@ public class GridRestProcessor extends GridProcessorAdapter {
         }
 
         // Authenticate client if invalid session.
-        AuthenticationContextAdapter authCtx = new AuthenticationContextAdapter();
+        AuthenticationContext authCtx = new AuthenticationContext();
 
         authCtx.subjectType(REMOTE_CLIENT);
         authCtx.subjectId(req.clientId());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d92bc169/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java
b/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java
index 05a79da..9239e9f 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java
@@ -23,32 +23,88 @@ import java.util.*;
 /**
  * Authentication context.
  */
-public interface AuthenticationContext {
+public class AuthenticationContext {
+    /** Subject type. */
+    private GridSecuritySubjectType subjType;
+
+    /** Subject ID.w */
+    private UUID subjId;
+
+    /** Credentials. */
+    private GridSecurityCredentials credentials;
+
+    /** Subject address. */
+    private InetSocketAddress addr;
+
     /**
      * Gets subject type.
      *
      * @return Subject type.
      */
-    public GridSecuritySubjectType subjectType();
+    public GridSecuritySubjectType subjectType() {
+        return subjType;
+    }
+
+    /**
+     * Sets subject type.
+     *
+     * @param subjType Subject type.
+     */
+    public void subjectType(GridSecuritySubjectType subjType) {
+        this.subjType = subjType;
+    }
 
     /**
      * Gets subject ID.
      *
      * @return Subject ID.
      */
-    public UUID subjectId();
+    public UUID subjectId() {
+        return subjId;
+    }
+
+    /**
+     * Sets subject ID.
+     *
+     * @param subjId Subject ID.
+     */
+    public void subjectId(UUID subjId) {
+        this.subjId = subjId;
+    }
 
     /**
      * Gets security credentials.
      *
      * @return Security credentials.
      */
-    public GridSecurityCredentials credentials();
+    public GridSecurityCredentials credentials() {
+        return credentials;
+    }
+
+    /**
+     * Sets security credentials.
+     *
+     * @param credentials Security credentials.
+     */
+    public void credentials(GridSecurityCredentials credentials) {
+        this.credentials = credentials;
+    }
 
     /**
      * Gets subject network address.
      *
      * @return Subject network address.
      */
-    public InetSocketAddress address();
+    public InetSocketAddress address() {
+        return addr;
+    }
+
+    /**
+     * Sets subject network address.
+     *
+     * @param addr Subject network address.
+     */
+    public void address(InetSocketAddress addr) {
+        this.addr = addr;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d92bc169/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContextAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContextAdapter.java
b/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContextAdapter.java
deleted file mode 100644
index 18fc0c1..0000000
--- a/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContextAdapter.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.plugin.security;
-
-import java.net.*;
-import java.util.*;
-
-/**
- * Authentication context.
- */
-public class AuthenticationContextAdapter implements AuthenticationContext {
-    /** Subject type. */
-    private GridSecuritySubjectType subjType;
-
-    /** Subject ID.w */
-    private UUID subjId;
-
-    /** Credentials. */
-    private GridSecurityCredentials credentials;
-
-    /** Subject address. */
-    private InetSocketAddress addr;
-
-    /**
-     * Gets subject type.
-     *
-     * @return Subject type.
-     */
-    @Override public GridSecuritySubjectType subjectType() {
-        return subjType;
-    }
-
-    /**
-     * Sets subject type.
-     *
-     * @param subjType Subject type.
-     */
-    public void subjectType(GridSecuritySubjectType subjType) {
-        this.subjType = subjType;
-    }
-
-    /**
-     * Gets subject ID.
-     *
-     * @return Subject ID.
-     */
-    @Override public UUID subjectId() {
-        return subjId;
-    }
-
-    /**
-     * Sets subject ID.
-     *
-     * @param subjId Subject ID.
-     */
-    public void subjectId(UUID subjId) {
-        this.subjId = subjId;
-    }
-
-    /**
-     * Gets security credentials.
-     *
-     * @return Security credentials.
-     */
-    @Override public GridSecurityCredentials credentials() {
-        return credentials;
-    }
-
-    /**
-     * Sets security credentials.
-     *
-     * @param credentials Security credentials.
-     */
-    public void credentials(GridSecurityCredentials credentials) {
-        this.credentials = credentials;
-    }
-
-    /**
-     * Gets subject network address.
-     *
-     * @return Subject network address.
-     */
-    @Override public InetSocketAddress address() {
-        return addr;
-    }
-
-    /**
-     * Sets subject network address.
-     *
-     * @param addr Subject network address.
-     */
-    public void address(InetSocketAddress addr) {
-        this.addr = addr;
-    }
-}


Mime
View raw message