Returns the provider assigned to the passed id.

@param id - the id
@return {@link MultifactorAuthenticationProvider}
432486
public T getProvider(final String id) {
        return (T) beanFactory.getBean(providerFactory.beanName(id));
    }
1240428
def get_provider(self, provider):
        """"""
        if self.provider is not None:
            return self.provider
        return providers.by_id(provider)
178321
private AuthenticationService getAuthenticationService(String id) {
        AuthenticationService service = authentication.getService(id);
        if (service == null) {
            throwIllegalArgumentExceptionInvalidAttributeValue(SecurityConfiguration.CFG_KEY_AUTHENTICATION_REF, id);
        }
        return service;
    }
785737
public function getProvider($id)
	{
		$this->ensureProviders();
		if (isset($this->providers[$id])) {
			return $this->providers[$id];
		}
		return false;
	}
650205
function getProvider(providerName, providerConfig) {
        return _.extend({}, providerConfig.opts, {
            profile: function profile(credentials, params, get, callback) {
                var proof = null;

                /* eslint camelcase:0 */
                if (providerConfig.useProof) {
                    proof = {
                        appsecret_proof: crypto
                            .createHmac('sha256', this.clientSecret)
                            .update(credentials.token)
                            .digest('hex')
                    };
                }

                get(providerConfig.url, proof, function (data) {
                    credentials.profile = {
                        authType:           providerName,
                        email:              data.email,
                        emailLower:         data.email && data.email.toLowerCase(),
                        emailConfirmed:     data.verified,
                        name: {
                            firstName:      data.given_name || '',
                            lastName:       data.family_name || '',
                            displayName:    data.name || ''
                        }
                    };

                    if (providerName === 'google') {
                        credentials.profile.profileImg = data.picture;
                        credentials.profile.googleAuthData = data;
                    }
                    else if (providerName === 'facebook') {
                        credentials.profile.profileImg = 'https://graph.facebook.com/' +
                            data.id + '/picture?width=80&height=80';
                        credentials.profile.fbAuthData = data;
                    }

                    return callback();
                });
            }
        });
    }
306989
public DifferentialFunction getFunctionById(@NonNull String id) {
        if (!ops.containsKey(id)) {
            throw new ND4JIllegalStateException("No function with id " + id + " found!");
        }
        return ops.get(id).getOp();
    }
654541
public static Optional<MultifactorAuthenticationProvider> resolveProvider(final Map<String, MultifactorAuthenticationProvider> providers,
                                                                              final Collection<String> requestMfaMethod) {
        return providers.values()
            .stream()
            .filter(p -> requestMfaMethod.stream().filter(Objects::nonNull).anyMatch(p::matches))
            .findFirst();
    }
1090071
static SLF4JServiceProvider getProvider() {
        if (INITIALIZATION_STATE == UNINITIALIZED) {
            synchronized (LoggerFactory.class) {
                if (INITIALIZATION_STATE == UNINITIALIZED) {
                    INITIALIZATION_STATE = ONGOING_INITIALIZATION;
                    performInitialization();
                }
            }
        }
        switch (INITIALIZATION_STATE) {
        case SUCCESSFUL_INITIALIZATION:
            return PROVIDER;
        case NOP_FALLBACK_INITIALIZATION:
            return NOP_FALLBACK_FACTORY;
        case FAILED_INITIALIZATION:
            throw new IllegalStateException(UNSUCCESSFUL_INIT_MSG);
        case ONGOING_INITIALIZATION:
            // support re-entrant behavior.
            // See also http://jira.qos.ch/browse/SLF4J-97
            return SUBST_PROVIDER;
        }
        throw new IllegalStateException("Unreachable code");
    }
800243
public String getAssetURL(String id) {
        String url = getRepositoryUrl() + "/assets/" + id + "?";
        if (getUserId() != null) {
            url += "userId=" + getUserId();
        }
        if (getUserId() != null && getPassword() != null) {
            url += "&password=" + getPassword();
        }
        if (getApiKey() != null) {
            url += "&apiKey=" + getApiKey();
        }
        return url;
    }
1197425
public Service getServiceObjectFromId(String id) {
        log.fine("Return service object for " + id);
        Service service = null;
        for (Service s : services.getServices()) {
            if (id.equals(s.getId())) {
                return s;
            }
        }
        return service;
    }
602768
public RegisteredService get(final String id) {
        if (NumberUtils.isCreatable(id)) {
            return get(Long.parseLong(id));
        }
        val keys = new HashMap<String, AttributeValue>();
        keys.put(ColumnNames.SERVICE_ID.getColumnName(), new AttributeValue(id));
        return getRegisteredServiceByKeys(keys);
    }
725864
public java.lang.String getProvider() {
    java.lang.Object ref = provider_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      provider_ = s;
      return s;
    }
  }
863334
protected Set<Event> resolveSingleMultifactorProvider(final Optional<RequestContext> context, final RegisteredService service,
                                                          final Principal principal,
                                                          final Collection<MultifactorAuthenticationProvider> providers) {
        val globalPrincipalAttributeValueRegex = casProperties.getAuthn().getMfa().getGlobalPrincipalAttributeValueRegex();
        val provider = providers.iterator().next();
        LOGGER.trace("Found a single multifactor provider [{}] in the application context", provider);
        val attributeNames = commaDelimitedListToSet(casProperties.getAuthn().getMfa().getGlobalPrincipalAttributeNameTriggers());
        return multifactorAuthenticationProviderResolver.resolveEventViaPrincipalAttribute(principal, attributeNames, service, context, providers,
            input -> input != null && input.matches(globalPrincipalAttributeValueRegex));
    }
847486
public static Optional<MultifactorAuthenticationProvider> getMultifactorAuthenticationProviderById(final String providerId,
                                                                                                       final ApplicationContext context) {
        return getAvailableMultifactorAuthenticationProviders(context).values()
            .stream()
            .filter(p -> p.matches(providerId))
            .findFirst();
    }
1259270
public static String translateIdToUsername(final String id) throws FrameworkException {

		if (Principal.SUPERUSER_ID.equals(id)) {
			return Settings.SuperUserName.getValue();
		}

		final Principal principal = StructrApp.getInstance().get(Principal.class, id);
		if (principal != null) {

			return principal.getName();
		}

		return Principal.ANONYMOUS;
	}
1081400
public static IAction getRegisteredAction(String id) {
        IAction action = getRegistry(false).get(id);
        return action == null ? getRegistry(true).get(id) : action;
    }
649571
protected Set<Event> resolveMultifactorProviderViaPredicate(final Optional<RequestContext> context,
                                                                final RegisteredService service,
                                                                final Principal principal,
                                                                final Collection<MultifactorAuthenticationProvider> providers) {
        val attributeNames = commaDelimitedListToSet(casProperties.getAuthn().getMfa().getGlobalPrincipalAttributeNameTriggers());
        return multifactorAuthenticationProviderResolver.resolveEventViaPrincipalAttribute(principal, attributeNames, service, context, providers,
            input -> providers.stream().anyMatch(provider -> input != null && provider.matches(input)));
    }