Package org.platformlayer.xaas

Source Code of org.platformlayer.xaas.ScopeProjectAuthorizationProvider

package org.platformlayer.xaas;

import javax.inject.Inject;

import org.platformlayer.Scope;
import org.platformlayer.model.ProjectAuthorization;

import com.google.inject.Provider;

public class ScopeProjectAuthorizationProvider implements Provider<ProjectAuthorization> {

  @Inject
  Provider<Scope> scopeProvider;

  @Override
  public ProjectAuthorization get() {
    ProjectAuthorization authentication = null;

    Scope scope = scopeProvider.get();
    if (scope != null) {
      authentication = scope.get(ProjectAuthorization.class);
    }

    return authentication;
  }

}
TOP

Related Classes of org.platformlayer.xaas.ScopeProjectAuthorizationProvider

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.