From 97d7bc9c138be8dc2878deb16149c3d63dd2bb4e Mon Sep 17 00:00:00 2001 From: Amanda Anganes <aanganes@mitre.org> Date: Thu, 9 Aug 2012 15:55:07 -0400 Subject: [PATCH] added field to indicate whether the client has been dynamically registered --- .../oauth2/model/ClientDetailsEntity.java | 19 ++++++++++++++++++- .../db/tables/database_tables.sql | 1 + 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/openid-connect-common/src/main/java/org/mitre/oauth2/model/ClientDetailsEntity.java b/openid-connect-common/src/main/java/org/mitre/oauth2/model/ClientDetailsEntity.java index b876e4f56..ae7872b9c 100644 --- a/openid-connect-common/src/main/java/org/mitre/oauth2/model/ClientDetailsEntity.java +++ b/openid-connect-common/src/main/java/org/mitre/oauth2/model/ClientDetailsEntity.java @@ -63,6 +63,7 @@ public class ClientDetailsEntity implements ClientDetails { private Boolean allowMultipleAccessTokens = false; // do we allow multiple access tokens, or not? private Boolean reuseRefreshToken = false; // do we let someone reuse a refresh token? private Integer idTokenValiditySeconds = 0; //timeout for id tokens + private Boolean dynamicallyRegistered = false; /** Fields from ClientDetails interface **/ private String clientId = ""; @@ -369,10 +370,26 @@ public class ClientDetailsEntity implements ClientDetails { this.idTokenValiditySeconds = idTokenValiditySeconds; } - + /** + * @return the dynamicallyRegistered + */ + @Basic + @Column(name="dynamically_registered") + public Boolean isDynamicallyRegistered() { + return dynamicallyRegistered; + } + + /** + * @param dynamicallyRegistered the dynamicallyRegistered to set + */ + public void setDynamicallyRegistered(Boolean dynamicallyRegistered) { + this.dynamicallyRegistered = dynamicallyRegistered; + } + + /** * If the clientSecret is not null, then it is always required. */ diff --git a/openid-connect-server/db/tables/database_tables.sql b/openid-connect-server/db/tables/database_tables.sql index b1e65b97f..4167e4ba6 100644 --- a/openid-connect-server/db/tables/database_tables.sql +++ b/openid-connect-server/db/tables/database_tables.sql @@ -57,6 +57,7 @@ CREATE TABLE client_details ( allow_multiple_access_tokens TINYINT, reuse_refresh_tokens TINYINT, id_token_validity_seconds BIGINT, + dynamically_registered TINYINT, client_id VARCHAR(256), client_secret VARCHAR(2000),