<commit_before>/**
 * @license
 * Copyright 2017 The FOAM Authors. All Rights Reserved.
 * http://www.apache.org/licenses/LICENSE-2.0
 */

foam.INTERFACE({
  package: 'foam.nanos.auth',
  name: 'AuthService',
	// javaImports: ['foam.core.X', 'javax.security.auth.login.LoginException'],
  methods: [
		{
  		name: 'generateChallenge',
			javaReturns: 'String',
			args: [
				{
					name: 'username',
					javaType: 'String'
				}
			]
    },
		{
			name: 'loginWithContext',
			javaReturns: 'void',
			javaThrows: [ 'LoginException' ],
			args: [
				{
					name: 'x',
					javaType: 'X'
				},
				{
					name: 'response',
					javaType: 'String'
				}
			]
		},
		{
			name: 'login',
			javaReturns: 'void',
			args: [
				{
					name: 'username',
					javaType: 'String'
				},
				{
					name: 'password',
					javaType: 'String'
				}
			]
		},
		{
			name: 'logout',
			javaReturns: 'void',
			args: [
				{
					name: 'username',
					javaType: 'String'
				}
			]
		},
		{
			name: 'check',
			javaReturns: 'Boolean',
			args: [
				{
					name: 'x',
					javaType: 'X'
				},
				{
					name: 'principal',
					javaType: 'java.security.Principal'
				},
				{
					name: 'permission',
					javaType: 'java.security.Permission'
				}
			]
		},
		{
			name: 'updatePassword',
			javaReturns: 'void',
			javaThrows: [ 'IllegalStateException' ],
			args: [
				{
					name: 'x',
					javaType: 'X'
				},
				{
					name: 'principal',
					javaType: 'java.security.Principal'
				},
				{
					name: 'oldPassword',
					javaType: 'String'
				},
				{
					name: 'newPassword',
					javaType: 'String'
				}
			]
		},
		{
			name: 'validatePrincipal',
			javaReturns: 'void',
			javaThrows: [ 'IllegalStateException' ],
			args: [
				{
					name: 'x',
					javaType: 'X'
				},
				{
					name: 'oldValue',
					javaType: 'java.security.Principal'
				},
				{
					name: 'newValue',
					javaType: 'java.security.Principal'
				}
			]
		}
  ]
});
<commit_msg>Changed login return type to Boolean<commit_after>/**
 * @license
 * Copyright 2017 The FOAM Authors. All Rights Reserved.
 * http://www.apache.org/licenses/LICENSE-2.0
 */

foam.INTERFACE({
  package: 'foam.nanos.auth',
  name: 'AuthService',
	// javaImports: ['foam.core.X', 'javax.security.auth.login.LoginException'],
  methods: [
		{
  		name: 'generateChallenge',
			javaReturns: 'String',
			args: [
				{
					name: 'username',
					javaType: 'String'
				}
			]
    },
		{
			name: 'loginWithContext',
			javaReturns: 'void',
			javaThrows: [ 'LoginException' ],
			args: [
				{
					name: 'x',
					javaType: 'X'
				},
				{
					name: 'response',
					javaType: 'String'
				}
			]
		},
		{
			name: 'login',
			javaReturns: 'Boolean',
			args: [
				{
					name: 'username',
					javaType: 'String'
				},
				{
					name: 'password',
					javaType: 'String'
				}
			]
		},
		{
			name: 'logout',
			javaReturns: 'void',
			args: [
				{
					name: 'username',
					javaType: 'String'
				}
			]
		},
		{
			name: 'check',
			javaReturns: 'Boolean',
			args: [
				{
					name: 'x',
					javaType: 'X'
				},
				{
					name: 'principal',
					javaType: 'java.security.Principal'
				},
				{
					name: 'permission',
					javaType: 'java.security.Permission'
				}
			]
		},
		{
			name: 'updatePassword',
			javaReturns: 'void',
			javaThrows: [ 'IllegalStateException' ],
			args: [
				{
					name: 'x',
					javaType: 'X'
				},
				{
					name: 'principal',
					javaType: 'java.security.Principal'
				},
				{
					name: 'oldPassword',
					javaType: 'String'
				},
				{
					name: 'newPassword',
					javaType: 'String'
				}
			]
		},
		{
			name: 'validatePrincipal',
			javaReturns: 'void',
			javaThrows: [ 'IllegalStateException' ],
			args: [
				{
					name: 'x',
					javaType: 'X'
				},
				{
					name: 'oldValue',
					javaType: 'java.security.Principal'
				},
				{
					name: 'newValue',
					javaType: 'java.security.Principal'
				}
			]
		}
  ]
});

{'fraction_non_alphanumeric': 0.17020202020202022, 'fraction_numerical': 0.0030303030303030303, 'mean_word_length': 1.9962178517397882, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2957809', 'n_tokens_mistral': 2072, 'n_tokens_neox': 1459, 'n_words': 255}