You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oltu.apache.org by "Chris Comstock (Created) (JIRA)" <ji...@apache.org> on 2012/04/05 21:38:24 UTC
[jira] [Created] (AMBER-52) Add functions to generate client id and
secret
Add functions to generate client id and secret
----------------------------------------------
Key: AMBER-52
URL: https://issues.apache.org/jira/browse/AMBER-52
Project: Amber
Issue Type: Improvement
Components: OAuth 2.0 - Authorization Server
Reporter: Chris Comstock
Priority: Minor
Create functions to generate a new client id and secret.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMBER-52) Add functions to generate client id
and secret
Posted by "Chris Comstock (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMBER-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13247991#comment-13247991 ]
Chris Comstock commented on AMBER-52:
-------------------------------------
I wasn't sure where this class should actually live so below is the code for generate random strings which can be used for client ID and secret generate.
{code}
import java.security.SecureRandom;
import java.util.Random;
public final class Oauth2Util {
/* The set of values to be used in generate values. */
private static final String symbols = "ABCDEFGJKLMNPRSTUVWXYZ0123456789";
private final Random random = new SecureRandom();
private char[] buf;
public void randomString(int length)
{
if (length < 1)
throw new IllegalArgumentException("length < 1: " + length);
buf = new char[length];
}
public String generateValue(int length)
{
this.randomString(length);
for (int idx = 0; idx < buf.length; ++idx)
buf[idx] = symbols.charAt(random.nextInt(symbols.length()));
return new String(buf);
}
}
{code}
> Add functions to generate client id and secret
> ----------------------------------------------
>
> Key: AMBER-52
> URL: https://issues.apache.org/jira/browse/AMBER-52
> Project: Amber
> Issue Type: Improvement
> Components: OAuth 2.0 - Authorization Server
> Reporter: Chris Comstock
> Priority: Minor
>
> Create functions to generate a new client id and secret.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (AMBER-52) Add functions to generate client id
and secret
Posted by "Chris Comstock (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMBER-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Comstock resolved AMBER-52.
---------------------------------
Resolution: Fixed
Ready for review of patch.
> Add functions to generate client id and secret
> ----------------------------------------------
>
> Key: AMBER-52
> URL: https://issues.apache.org/jira/browse/AMBER-52
> Project: Amber
> Issue Type: Improvement
> Components: OAuth 2.0 - Authorization Server
> Reporter: Chris Comstock
> Priority: Minor
> Attachments: amber_52.patch
>
>
> Create functions to generate a new client id and secret.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AMBER-52) Add functions to generate client id and
secret
Posted by "Chris Comstock (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMBER-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Comstock updated AMBER-52:
--------------------------------
Attachment: amber_52.patch
Patch for JIRA ticket Amber-52
> Add functions to generate client id and secret
> ----------------------------------------------
>
> Key: AMBER-52
> URL: https://issues.apache.org/jira/browse/AMBER-52
> Project: Amber
> Issue Type: Improvement
> Components: OAuth 2.0 - Authorization Server
> Reporter: Chris Comstock
> Priority: Minor
> Attachments: amber_52.patch
>
>
> Create functions to generate a new client id and secret.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (AMBER-52) Add functions to generate client id
and secret
Posted by "Antonio Sanso (Reopened) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMBER-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antonio Sanso reopened AMBER-52:
--------------------------------
Assignee: Antonio Sanso
> Add functions to generate client id and secret
> ----------------------------------------------
>
> Key: AMBER-52
> URL: https://issues.apache.org/jira/browse/AMBER-52
> Project: Amber
> Issue Type: Improvement
> Components: OAuth 2.0 - Authorization Server
> Reporter: Chris Comstock
> Assignee: Antonio Sanso
> Priority: Minor
> Attachments: amber_52.patch
>
>
> Create functions to generate a new client id and secret.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira