<commit_before>'use strict';

var BaseStrategy = require('passport-dvpnt-oauth2-strategy').Strategy;
var util = require('util');


function Strategy(options, verify) {
	options.authorizationURL = options.authorizationURL ||
		'https://all.culture.ru/auth/oauth2/authorize';
	options.tokenURL = options.tokenURL ||
		'https://all.culture.ru/auth/oauth2/token';

	BaseStrategy.call(this, options, verify);

	this.name = 'eipsk';
	this._profileURL = options.profileURL || 'https://all.culture.ru/auth/api/1.0/user';
}

util.inherits(Strategy, BaseStrategy);

Strategy.prototype.parseProfile = function(json) {
	var user = json.user;
	var profile = {};

	profile.id = user._id;
	profile.displayName = user.firstName + ' ' + user.lastName;
	profile.name = {
		familyName: user.lastName,
		givenName: user.firstName
	};

	profile.gender = user.gender;
	profile.profileUrl = 'https://all.culture.ru/cabinet/users/' + profile.id;<commit_msg>change hostname to pro.culture.ru<commit_after>'use strict';

var BaseStrategy = require('passport-dvpnt-oauth2-strategy').Strategy;
var util = require('util');


function Strategy(options, verify) {
	options.authorizationURL = options.authorizationURL ||
		'https://pro.culture.ru/auth/oauth2/authorize';
	options.tokenURL = options.tokenURL ||
		'https://pro.culture.ru/auth/oauth2/token';

	BaseStrategy.call(this, options, verify);

	this.name = 'eipsk';
	this._profileURL = options.profileURL || 'https://pro.culture.ru/auth/api/1.0/user';
}

util.inherits(Strategy, BaseStrategy);

Strategy.prototype.parseProfile = function(json) {
	var user = json.user;
	var profile = {};

	profile.id = user._id;
	profile.displayName = user.firstName + ' ' + user.lastName;
	profile.name = {
		familyName: user.lastName,
		givenName: user.firstName
	};

	profile.gender = user.gender;
	profile.profileUrl = 'https://pro.culture.ru/cabinet/users/' + profile.id;
{'fraction_non_alphanumeric': 0.15800636267232238, 'fraction_numerical': 0.005302226935312832, 'mean_word_length': 4.649700598802395, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3047522', 'n_tokens_mistral': 664, 'n_tokens_neox': 629, 'n_words': 100}