<commit_before>﻿using System;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Http.Controllers;
using D2L.Security.OAuth2.Principal;

namespace D2L.Security.OAuth2.Authorization {
	[AttributeUsage( AttributeTargets.All, AllowMultiple = false )]
	internal sealed class RequireClaimAttribute : AuthorizeAttribute {
		private readonly string m_claimType;

		public RequireClaimAttribute( string claimType ) {
			m_claimType = claimType;
		}

		protected override bool IsAuthorized( HttpActionContext actionContext ) {
			var principal = actionContext
				.ControllerContext
				.RequestContext
				.Principal as ID2LPrincipal;

			if( principal == null ) {
				return false;
			}
<commit_msg>Make RequireClaimAttribute public (vs. internal)<commit_after>﻿using System;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Http.Controllers;
using D2L.Security.OAuth2.Principal;

namespace D2L.Security.OAuth2.Authorization {
	[AttributeUsage( AttributeTargets.All, AllowMultiple = false )]
	public sealed class RequireClaimAttribute : AuthorizeAttribute {
		private readonly string m_claimType;

		public RequireClaimAttribute( string claimType ) {
			m_claimType = claimType;
		}

		protected override bool IsAuthorized( HttpActionContext actionContext ) {
			var principal = actionContext
				.ControllerContext
				.RequestContext
				.Principal as ID2LPrincipal;

			if( principal == null ) {
				return false;
			}

{'fraction_non_alphanumeric': 0.07786052809749493, 'fraction_numerical': 0.006770480704129994, 'mean_word_length': 4.641221374045801, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1889836', 'n_tokens_mistral': 477, 'n_tokens_neox': 414, 'n_words': 108}