-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathTenantProfile.java
More file actions
60 lines (45 loc) · 1.43 KB
/
Copy pathTenantProfile.java
File metadata and controls
60 lines (45 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.aad.msal4j;
import java.util.Map;
import java.util.Objects;
/**
* Representation of a single tenant profile
*/
class TenantProfile implements ITenantProfile {
Map<String, ?> idTokenClaims;
String environment;
public TenantProfile(Map<String, ?> idTokenClaims, String environment) {
this.idTokenClaims = idTokenClaims;
this.environment = environment;
}
public Map<String, ?> getClaims() {
return idTokenClaims;
}
public Map<String, ?> idTokenClaims() {
return this.idTokenClaims;
}
public String environment() {
return this.environment;
}
public TenantProfile idTokenClaims(Map<String, ?> idTokenClaims) {
this.idTokenClaims = idTokenClaims;
return this;
}
public TenantProfile environment(String environment) {
this.environment = environment;
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof TenantProfile)) return false;
TenantProfile other = (TenantProfile) o;
return Objects.equals(idTokenClaims, other.idTokenClaims)
&& Objects.equals(environment, other.environment);
}
@Override
public int hashCode() {
return Objects.hash(idTokenClaims, environment);
}
}