-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extract class to separate file and getters/setters
- Loading branch information
1 parent
8931616
commit 2cdcf22
Showing
4 changed files
with
90 additions
and
50 deletions.
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
auth0/src/main/java/com/auth0/android/provider/IdTokenVerificationOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package com.auth0.android.provider; | ||
|
||
import android.support.annotation.NonNull; | ||
import android.support.annotation.Nullable; | ||
|
||
import java.util.Date; | ||
|
||
class IdTokenVerificationOptions { | ||
private final String issuer; | ||
private final String audience; | ||
private final SignatureVerifier verifier; | ||
private String nonce; | ||
private Integer maxAge; | ||
private Integer clockSkew; | ||
private Date clock; | ||
|
||
IdTokenVerificationOptions(@NonNull String issuer, @NonNull String audience, @NonNull SignatureVerifier verifier) { | ||
this.issuer = issuer; | ||
this.audience = audience; | ||
this.verifier = verifier; | ||
} | ||
|
||
void setNonce(@Nullable String nonce) { | ||
this.nonce = nonce; | ||
} | ||
|
||
void setMaxAge(@Nullable Integer maxAge) { | ||
this.maxAge = maxAge; | ||
} | ||
|
||
void setClockSkew(@Nullable Integer clockSkew) { | ||
this.clockSkew = clockSkew; | ||
} | ||
|
||
void setClock(@Nullable Date now) { | ||
this.clock = now; | ||
} | ||
|
||
@NonNull | ||
String getIssuer() { | ||
return issuer; | ||
} | ||
|
||
@NonNull | ||
String getAudience() { | ||
return audience; | ||
} | ||
|
||
@NonNull | ||
SignatureVerifier getSignatureVerifier() { | ||
return verifier; | ||
} | ||
|
||
@Nullable | ||
String getNonce() { | ||
return nonce; | ||
} | ||
|
||
@Nullable | ||
Integer getMaxAge() { | ||
return maxAge; | ||
} | ||
|
||
@Nullable | ||
Integer getClockSkew() { | ||
return clockSkew; | ||
} | ||
|
||
@Nullable | ||
Date getClock() { | ||
return clock; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters