Build an OAuth2 server from the configured values for the given name.

@param name
@return server
161475
public static StructrOAuthClient getServer(final String name) {

		String configuredOauthServers  = Settings.OAuthServers.getValue();
		String[] authServers = configuredOauthServers.split(" ");

		for (String authServer : authServers) {

			if (authServer.equals(name)) {

				String authLocation  = Settings.getOrCreateStringSetting("oauth", authServer, "authorization_location").getValue("");
				String tokenLocation = Settings.getOrCreateStringSetting("oauth", authServer, "token_location").getValue("");
				String clientId      = Settings.getOrCreateStringSetting("oauth", authServer, "client_id").getValue("");
				String clientSecret  = Settings.getOrCreateStringSetting("oauth", authServer, "client_secret").getValue("");
				String redirectUri   = Settings.getOrCreateStringSetting("oauth", authServer, "redirect_uri").getValue("");

				// Minumum required fields
				if (clientId != null && clientSecret != null && redirectUri != null) {

					Class serverClass		= getServerClassForName(name);
					Class tokenResponseClass	= getTokenResponseClassForName(name);

					if (serverClass != null) {

						StructrOAuthClient oauthServer;
						try {

							oauthServer = (StructrOAuthClient) serverClass.newInstance();
							oauthServer.init(authLocation, tokenLocation, clientId, clientSecret, redirectUri, tokenResponseClass);

							logger.info("Using OAuth server {}", oauthServer);

							return oauthServer;

						} catch (Throwable t) {

							logger.error("Could not instantiate auth server", t);

						}
						
					} else {
					
						logger.warn("No OAuth provider found for name {}, ignoring.", name);
					}
				}
			}
		}

		return null;
	}
307473
public static sslpolicy get(nitro_service service, String name) throws Exception{
		sslpolicy obj = new sslpolicy();
		obj.set_name(name);
		sslpolicy response = (sslpolicy) obj.get_resource(service);
		return response;
	}
530125
private function build(string $name)
    {
        $instance = null;
        $map = $this->map[$name];

        if (is_array($map)) {
            $params = $this->getParamsFromMap($map);
            $instance = new $name(...$params);
        } elseif ($map instanceof \Closure) {
            $instance = $map($this);
        } elseif (is_object($map)) {
            $instance = $map;
        } elseif (is_string($map)) {
            $instance = $this->get($map);
        } else {
            throw new \Exception('Invalid map');
        }

        return $instance;
    }
784173
public function server(string $name): string {
        if (!isset($this->server[$name])) {
            return "";
        }
        return $this->server[$name];
    }
231473
public static authenticationcertpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{
		authenticationcertpolicy_authenticationvserver_binding obj = new authenticationcertpolicy_authenticationvserver_binding();
		obj.set_name(name);
		authenticationcertpolicy_authenticationvserver_binding response[] = (authenticationcertpolicy_authenticationvserver_binding[]) obj.get_resources(service);
		return response;
	}
233795
protected UserApiKey createApiKeyInternal(final String name) {
    final StitchAuthDocRequest.Builder reqBuilder = new StitchAuthDocRequest.Builder();
    reqBuilder
            .withMethod(Method.POST)
            .withPath(this.getBaseRoute())
            .withDocument(new Document(ApiKeyFields.NAME, name))
            .withRefreshToken();
    return getRequestClient().doAuthenticatedRequest(
            reqBuilder.build(),
            new UserApiKeyDecoder()
    );
  }
386633
public static TokenType create(@NonNull String name) {
      TokenType toReturn = DynamicEnum.register(new TokenType(name));
      values.add(toReturn);
      return toReturn;
   }
266508
public static sslpolicy_sslvserver_binding[] get(nitro_service service, String name) throws Exception{
		sslpolicy_sslvserver_binding obj = new sslpolicy_sslvserver_binding();
		obj.set_name(name);
		sslpolicy_sslvserver_binding response[] = (sslpolicy_sslvserver_binding[]) obj.get_resources(service);
		return response;
	}
456047
public HttpSession getHttpSession(String name) {
		synchronized (this.sessions) {
			for (HttpSession session : sessions) {
				if (session.getName().equals(name)) {
					return session;
				}
			}
		}
		return null;
	}
169317
public ServerWebExchangeLimiterBuilder partitionByHeader(String name) {
		return partitionResolver(
				exchange -> exchange.getRequest().getHeaders().getFirst(name));
	}
50400
public static authenticationlocalpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{
		authenticationlocalpolicy_authenticationvserver_binding obj = new authenticationlocalpolicy_authenticationvserver_binding();
		obj.set_name(name);
		authenticationlocalpolicy_authenticationvserver_binding response[] = (authenticationlocalpolicy_authenticationvserver_binding[]) obj.get_resources(service);
		return response;
	}
224405
public static Builder v1Builder(String name) {
        return new Builder(name, V1MarshallerSet.marshallers(), V1MarshallerSet.setMarshallers(),
                           StandardUnmarshallerSet.unmarshallers(),
                           StandardUnmarshallerSet.setUnmarshallers());
    }
552225
@Override
    public <T> T get(String name) {
        return (T) config.get(name);
    }
794371
public <T> T getOnce(final Class<T> clazz, final String name)
	{
		return new JAXBNamedResourceFactory<T>(this.config, this.factory, name, clazz).get();
	}
1203208
public static <F> Protocol.Builder<F> builder(final String name) {
        return new ProtocolImpl<F>(name);
    }
570725
@Nullable public de.uniulm.omi.cloudiator.flexiant.client.domain.Server getServer(
        final String serverUUID) throws FlexiantException {
        final io.github.cloudiator.flexiant.extility.Server server =
            this.getResource(serverUUID, ResourceType.SERVER,
                io.github.cloudiator.flexiant.extility.Server.class);
        if (server == null) {
            return null;
        }
        return new de.uniulm.omi.cloudiator.flexiant.client.domain.Server(server);
    }
164166
public static authenticationcertpolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{
		authenticationcertpolicy_vpnvserver_binding obj = new authenticationcertpolicy_vpnvserver_binding();
		obj.set_name(name);
		authenticationcertpolicy_vpnvserver_binding response[] = (authenticationcertpolicy_vpnvserver_binding[]) obj.get_resources(service);
		return response;
	}