// Path: src/main/java/com/github/segator/proxylive/helper/AuthorityRoles.java
// public enum AuthorityRoles {
//     USER("USER"),
//     SERVICE_ACCOUNT("SERVICE_ACCOUNT"),
//     ALLOW_ENCODING("ENCODE_PULLER"),
//     ADMIN("ADMIN");
//     private String authority;
//     AuthorityRoles(String authority) {
//         this.authority = authority;
//     }
// 
//     public String getAuthority() {
//         return authority;
//     }
// }


import com.github.segator.proxylive.helper.AuthorityRoles;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import java.util.ArrayList;
import java.util.List;
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.github.segator.proxylive.service;



/**
 *
 * @author isaac
 */
public class WithoutAuthenticationService implements AuthenticationService {

    @Override
    public boolean loginUser(String user, String password) throws Exception {
        return true;
    }

    @Override
    public List<GrantedAuthority> getUserRoles(String user) {
        ArrayList<GrantedAuthority> roles = new ArrayList();

// Path: src/main/java/com/github/segator/proxylive/helper/AuthorityRoles.java
// public enum AuthorityRoles {
//     USER("USER"),
//     SERVICE_ACCOUNT("SERVICE_ACCOUNT"),
//     ALLOW_ENCODING("ENCODE_PULLER"),
//     ADMIN("ADMIN");
//     private String authority;
//     AuthorityRoles(String authority) {
//         this.authority = authority;
//     }
// 
//     public String getAuthority() {
//         return authority;
//     }
// }


// Path: src/main/java/com/github/segator/proxylive/service/WithoutAuthenticationService.java
import com.github.segator.proxylive.helper.AuthorityRoles;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import java.util.ArrayList;
import java.util.List;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.github.segator.proxylive.service;



/**
 *
 * @author isaac
 */
public class WithoutAuthenticationService implements AuthenticationService {

    @Override
    public boolean loginUser(String user, String password) throws Exception {
        return true;
    }

    @Override
    public List<GrantedAuthority> getUserRoles(String user) {
        ArrayList<GrantedAuthority> roles = new ArrayList();

        roles.add(new SimpleGrantedAuthority(AuthorityRoles.USER.getAuthority()));