[ 
https://issues.apache.org/jira/browse/EAGLE-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15574115#comment-15574115
 ] 

ASF GitHub Bot commented on EAGLE-582:
--------------------------------------

Github user anyway1021 commented on a diff in the pull request:

    https://github.com/apache/incubator-eagle/pull/468#discussion_r83355134
  
    --- Diff: 
eagle-server/src/main/java/org/apache/eagle/server/authentication/authenticator/LdapBasicAuthenticator.java
 ---
    @@ -0,0 +1,40 @@
    +/*
    + * 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.eagle.server.authentication.authenticator;
    +
    +import com.google.common.base.Optional;
    +import io.dropwizard.auth.AuthenticationException;
    +import io.dropwizard.auth.basic.BasicCredentials;
    +import org.apache.eagle.common.authentication.User;
    +import 
org.apache.eagle.server.authentication.config.AuthenticationSettings;
    +
    +public class LdapBasicAuthenticator extends 
AbstractSwitchableAuthenticator<BasicCredentials, User> {
    +    private AuthenticationSettings config = null;
    +
    +    public LdapBasicAuthenticator(AuthenticationSettings settings) {
    +        super(settings, User.class);
    +    }
    +
    +    public Optional<User> authenticate(BasicCredentials credentials) 
throws AuthenticationException {
    +        // TODO need to implement ldap authentication logic
    +        boolean pass = true;
    +        if (pass) {
    --- End diff --
    
    it's no more than a fake placeholder, will be removed by real logic soon


> register simple Basic Authentication to server application
> ----------------------------------------------------------
>
>                 Key: EAGLE-582
>                 URL: https://issues.apache.org/jira/browse/EAGLE-582
>             Project: Eagle
>          Issue Type: Sub-task
>    Affects Versions: v0.5.0
>            Reporter: Michael Wu
>            Assignee: Michael Wu
>             Fix For: v0.5.0
>
>
> simple basic authentication with just some expected username-password pairs 
> configured for the application.
> This is one of the sub-tasks of ticket EAGLE-433, to successfully register a 
> simple Basic Authentication authenticator to the server application.
> With this check-in, when the server is up, any access to rest api method that 
> has a @Auth annotation on it's User field will require correct credentials.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to