Ignore:
Timestamp:
Apr 25, 2012, 10:42:52 PM (10 years ago)
Author:
work@…
Message:
  • changed application wide secret into a user specific api key which is automatically generated when a user is created. The key is available in the user's profile or through the user administration pages
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/authentication/SecUser.groovy

    r2086 r2225  
    1010        String userStatus               // shibboleth request header: coin-user-status
    1111        String email
     12    String apiKey           // api key for clients using the API
    1213        Date dateCreated
     14
    1315        boolean shibbolethUser = false
    1416        boolean enabled
     
    2830                voName nullable: true
    2931                userStatus nullable: true
     32        apiKey nullable: true, unique: true
    3033        }
    3134
     
    6063        }
    6164
     65    /**
     66     * Generate a shared secret for this user
     67     * @void
     68     */
     69    def beforeInsert = {
     70        // generate an apiKey for this user
     71        apiKey = UUID.randomUUID().toString()
     72    }
     73
    6274        /**
    6375         * return the text representation of this user
Note: See TracChangeset for help on using the changeset viewer.